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-Url: https://git.lttng.org./?a=commitdiff_plain;h=7ffc31a26846c17bbb31a86ece6471f769805633;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 9fc21fcaf..30f7d49ba 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2486,8 +2486,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) {