From b7064eaa65112fa87bd75ddeed768bae0645f271 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 18 Nov 2014 13:37:29 -0500 Subject: [PATCH] Fix: Missing rcu_read_lock in ust_app_get_nb_stream() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/ust-app.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 132bde1bd..891d75f7c 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -5152,10 +5152,12 @@ unsigned int ust_app_get_nb_stream(struct ltt_ust_session *usess) cds_list_for_each_entry(reg, &usess->buffer_reg_uid_list, lnode) { struct buffer_reg_channel *reg_chan; + rcu_read_lock(); cds_lfht_for_each_entry(reg->registry->channels->ht, &iter.iter, reg_chan, node.node) { ret += reg_chan->stream_count; } + rcu_read_unlock(); } break; } -- 2.34.1