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:47:44 +0000 (10:47 -0500)
commitadcc8b5e0be84d0b8c4b414d7db5b8c54e0b0466
treefb67ca5e2bd3d0a7698c9595800b50975fb54664
parent0f3eaad4c02e725a7310d94ebdaa858344b9bdbe
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 lttng_statedump_process_pid_ns(), 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.026583 seconds and 5 git commands to generate.