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>
Mon, 31 Jul 2017 23:29:51 +0000 (19:29 -0400)
commitdf3c77c8dbbd102718f7149b075ba026d70a9e27
tree433112757263e95d55c98963ceab7901544cd833
parent55d7bb027104ac0afd80be872e0ff7ebb832216e
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.025259 seconds and 4 git commands to generate.