Fix: vppid context should test for current nsproxy
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Aug 2012 19:09:05 +0000 (15:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Aug 2012 19:10:34 +0000 (15:10 -0400)
Triggers a NULL pointer exception with tracing scheduling events with
vppid context activated.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.026517 seconds and 4 git commands to generate.