From: Mathieu Desnoyers Date: Fri, 2 Mar 2012 21:56:13 +0000 (-0500) Subject: Fix: add missing rcu read lock across RCU HT iteration X-Git-Tag: v2.0.0-rc2~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=481d6c57872d621707cf7055432e84a1f54e137b;p=lttng-tools.git Fix: add missing rcu read lock across RCU HT iteration Signed-off-by: Mathieu Desnoyers --- 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