trace_lttng_statedump_process_user_ns() internally checks whether
user_ns is NULL. While this does not appear to be a possible return
value for task_cred_xxx(), err on the safe side and check for NULL here
as well to be consistent with the paranoid behavior of
trace_lttng_statedump_process_user_ns().
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
user_ns = task_cred_xxx(p, user_ns);
do {
trace_lttng_statedump_process_user_ns(session, p, user_ns);
user_ns = task_cred_xxx(p, user_ns);
do {
trace_lttng_statedump_process_user_ns(session, p, user_ns);
- user_ns = user_ns->lttng_user_ns_parent;
+ /*
+ * trace_lttng_statedump_process_user_ns() internally
+ * checks whether user_ns is NULL. While this does not
+ * appear to be a possible return value for
+ * task_cred_xxx(), err on the safe side and check
+ * for NULL here as well to be consistent with the
+ * paranoid behavior of
+ * trace_lttng_statedump_process_user_ns().
+ */
+ user_ns = user_ns ? user_ns->lttng_user_ns_parent : NULL;