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.5.3~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=27c08214e6a54c1955d01f2471573c0720a2faa4;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 9134d4683..fc95302fc 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -767,6 +767,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; @@ -780,6 +781,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) } } } + rcu_read_unlock(); } /* Close any relayd session */