From de544ea58e0231054bb62e2c814c662b894d6e25 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 22 Aug 2012 15:09:05 -0400 Subject: [PATCH] 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 --- lttng-context-vppid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.34.1