Fix: vppid context should test for current nsproxy
[lttng-modules.git] / lttng-context-vppid.c
index 3d55fc5d6a09750f23bb08561e9f8d9725ffb75e..365d97394e89c98094b43dacc5918ee353271c00 100644 (file)
@@ -48,11 +48,12 @@ void vppid_record(struct lttng_ctx_field *field,
        pid_t vppid;
 
        /*
-        * nsproxy can be NULL when scheduled out of exit.
+        * current nsproxy can be NULL when scheduled out of exit. pid_vnr uses
+        * the current thread nsproxy to perform the lookup.
         */
        rcu_read_lock();
        parent = rcu_dereference(current->real_parent);
-       if (!parent->nsproxy)
+       if (!current->nsproxy)
                vppid = 0;
        else
                vppid = task_tgid_vnr(parent);
This page took 0.023056 seconds and 4 git commands to generate.