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.4.3~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c739007373be4b2682252004108e8ecc42a14917;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 44a71fc59..7a1b7a98b 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -772,6 +772,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; @@ -785,6 +786,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) } } } + rcu_read_unlock(); } /* Close any relayd session */