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:15:52 +0000 (17:15 -0400)
commitf712b0897400a37cf3fa9abdbc11aa00df1e6993
tree0b293f06c63cc38d30267d2cc5bfe91df8d07476
parent51ae18c40a280a8e97032307581bad0cf2053294
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.025547 seconds and 4 git commands to generate.