Fix: Missing rcu_read_lock in cmd_list_channels()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Nov 2014 19:19:43 +0000 (14:19 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 21 Nov 2014 07:35:55 +0000 (02:35 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index b0bd9837ff9a62846f7a4dbf7dabe130f2d6082b..21881296ec31b2a7cabc34c567082c6b5888c202 100644 (file)
@@ -2469,8 +2469,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) {
This page took 0.02761 seconds and 4 git commands to generate.