From: Jérémie Galarneau Date: Tue, 18 Nov 2014 19:19:43 +0000 (-0500) Subject: Fix: Missing rcu_read_lock in cmd_list_channels() X-Git-Tag: v2.5.3~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=52a3011a96d63b7b75e1e643e000b55afa883447;p=lttng-tools.git Fix: Missing rcu_read_lock in cmd_list_channels() Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 0a88a26bb..4b7ef62b6 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2413,8 +2413,10 @@ ssize_t cmd_list_channels(int domain, struct ltt_session *session, break; case LTTNG_DOMAIN_UST: if (session->ust_session != NULL) { + rcu_read_lock(); nb_chan = lttng_ht_get_count( - session->ust_session->domain_global.channels); + session->ust_session->domain_global.channels); + rcu_read_unlock(); } DBG3("Number of UST global channels %zd", nb_chan); if (nb_chan < 0) {