Fix: statedump: check task_active_pid_ns return value for NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 Feb 2020 14:58:42 +0000 (09:58 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 Feb 2020 15:48:29 +0000 (10:48 -0500)
commit3e2bb820a3c3d74f5738590a9e4ca6f5580b4251
treefcc992409f537b45caf48df1929196bb983caa38
parentb276cb134fd08aa26c7acb756a041a8b494ef689
Fix: statedump: check task_active_pid_ns return value for NULL

The lttng-statedump checks the return value of task_active_pid_ns()
before each use within trace_lttng_statedump_process_state(), but misses
the NULL check before dereferencing pid_ns->parent.

This race happens if a task exists in "dead" state while the statedump
iterates on that task.

Reported-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-statedump-impl.c
This page took 0.024677 seconds and 4 git commands to generate.