From: Jérémie Galarneau Date: Tue, 2 Dec 2014 03:06:23 +0000 (-0500) Subject: Fix: Missing RCU read lock in kernel_destroy_session() X-Git-Tag: v2.6.0-rc4~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e4074462a7ce4662a258d9f87a0bc19b5dce999e;p=lttng-tools.git Fix: Missing RCU read lock in kernel_destroy_session() Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index a9151f4d6..65c470e09 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -793,6 +793,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) struct lttng_ht_iter iter; /* For each consumer socket. */ + rcu_read_lock(); cds_lfht_for_each_entry(ksess->consumer->socks->ht, &iter.iter, socket, node.node) { struct ltt_kernel_channel *chan; @@ -806,6 +807,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) } } } + rcu_read_unlock(); } /* Close any relayd session */