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-Url: http://git.efficios.com/?a=commitdiff_plain;h=d069d57732e9a19624078b6e8ca424dbd5827fc0;hp=1f345e94095b14037b3f39bc0b48db6b6543efd6;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 b7a362dc0..6b404c0ed 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -794,6 +794,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; @@ -807,6 +808,7 @@ void kernel_destroy_session(struct ltt_kernel_session *ksess) } } } + rcu_read_unlock(); } /* Close any relayd session */