From 481d6c57872d621707cf7055432e84a1f54e137b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 2 Mar 2012 16:56:13 -0500 Subject: [PATCH] Fix: add missing rcu read lock across RCU HT iteration Signed-off-by: Mathieu Desnoyers --- src/common/consumer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/consumer.c b/src/common/consumer.c index d7b319452..3fcb528d1 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -500,6 +500,7 @@ int consumer_update_poll_array( struct lttng_consumer_stream *stream; DBG("Updating poll fd array"); + rcu_read_lock(); cds_lfht_for_each_entry(consumer_data.stream_ht->ht, &iter.iter, stream, node.node) { if (stream->state != LTTNG_CONSUMER_ACTIVE_STREAM) { @@ -511,6 +512,7 @@ int consumer_update_poll_array( local_stream[i] = stream; i++; } + rcu_read_unlock(); /* * Insert the consumer_poll_pipe at the end of the array and don't -- 2.34.1