Fix: ambiguous ownership of kernel context by multiple channels
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 31 Jul 2017 21:51:35 +0000 (17:51 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 1 Aug 2017 21:13:32 +0000 (17:13 -0400)
commitda23da0632799d4a8dba9b25ddc9063dc662c891
tree1bf4699b70569be6d593477d0aef015483b9164c
parentee4efda9d88ed0eefac33b4ec9dfd41904f9455a
Fix: ambiguous ownership of kernel context by multiple channels

A kernel context, when added to multiple channels, must be copied
before being added to individual channels. The current code
adds the same ltt_kernel_context structure to multiple kernel
channels which introduces a conceptual ambiguity in the ownership
of the context object.

Concretely, creating multiple kernel channels and adding a context
to all of them (by not specifying a channel name) causes the context
to be added to each channels' list of contexts, overwritting the
context's list node, and causing the channel context lists to become
corrupted. This results in crashes being observed during the
destruction of the session.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/context.c
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/trace-kernel.c
src/bin/lttng-sessiond/trace-kernel.h
This page took 0.025523 seconds and 4 git commands to generate.