From: Mathieu Desnoyers Date: Wed, 22 Aug 2012 19:09:05 +0000 (-0400) Subject: Fix: vppid context should test for current nsproxy X-Git-Tag: v2.1.0-rc1~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=de544ea58e0231054bb62e2c814c662b894d6e25;p=lttng-modules.git Fix: vppid context should test for current nsproxy Triggers a NULL pointer exception with tracing scheduling events with vppid context activated. Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-context-vppid.c b/lttng-context-vppid.c index 3d55fc5d..365d9739 100644 --- a/lttng-context-vppid.c +++ b/lttng-context-vppid.c @@ -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);