From: Jérémie Galarneau Date: Tue, 18 Nov 2014 19:15:07 +0000 (-0500) Subject: Fix: Missing rcu_read_locks in cmd_list_domains() X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e0a74f0198e6b12320fb6118b5193759e4329f76;p=lttng-tools.git Fix: Missing rcu_read_locks in cmd_list_domains() Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 0b97ed61a..9fc21fcaf 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2415,12 +2415,14 @@ ssize_t cmd_list_domains(struct ltt_session *session, DBG3("Listing domains found UST global domain"); nb_dom++; + rcu_read_lock(); cds_lfht_for_each_entry(session->ust_session->agents->ht, &iter.iter, agt, node.node) { if (agt->being_used) { nb_dom++; } } + rcu_read_unlock(); } if (!nb_dom) { @@ -2443,6 +2445,7 @@ ssize_t cmd_list_domains(struct ltt_session *session, (*domains)[index].buf_type = session->ust_session->buffer_type; index++; + rcu_read_lock(); cds_lfht_for_each_entry(session->ust_session->agents->ht, &iter.iter, agt, node.node) { if (agt->being_used) { @@ -2451,6 +2454,7 @@ ssize_t cmd_list_domains(struct ltt_session *session, index++; } } + rcu_read_unlock(); } end: return nb_dom;