From 19152ffe0ff82476f335b57948915e9146fb3626 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 b0e47a086..0ae02c324 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -5124,10 +5124,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.39.5