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.4.3~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bfeab1106e53d1c5648f18a4cef0c40aa82f7714;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 b6a710778..f76a4422e 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2386,8 +2386,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) {