Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] [PATCH lttng-tools 1/3] Fix: Add missing call rcu and read side lock
@ 2012-10-03 15:48 David Goulet
  2012-10-03 15:48 ` [lttng-dev] [PATCH lttng-tools 2/3] Add hash table argument to helper functions David Goulet
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: David Goulet @ 2012-10-03 15:48 UTC (permalink / raw)


Signed-off-by: David Goulet <dgoulet at efficios.com>
---
 src/common/consumer.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/common/consumer.c b/src/common/consumer.c
index f01eb5d..7c3762e 100644
--- a/src/common/consumer.c
+++ b/src/common/consumer.c
@@ -688,7 +688,9 @@ void consumer_del_channel(struct lttng_consumer_channel *channel)
 		}
 	}
 
+	rcu_read_lock();
 	call_rcu(&channel->node.head, consumer_free_channel);
+	rcu_read_unlock();
 end:
 	pthread_mutex_unlock(&consumer_data.lock);
 }
@@ -1535,7 +1537,7 @@ static void destroy_stream_ht(struct lttng_ht *ht)
 		ret = lttng_ht_del(ht, &iter);
 		assert(!ret);
 
-		free(stream);
+		call_rcu(&stream->node.head, consumer_free_stream);
 	}
 	rcu_read_unlock();
 
@@ -1635,7 +1637,9 @@ static void consumer_del_metadata_stream(struct lttng_consumer_stream *stream)
 		consumer_del_channel(stream->chan);
 	}
 
-	free(stream);
+	rcu_read_lock();
+	call_rcu(&stream->node.head, consumer_free_stream);
+	rcu_read_unlock();
 }
 
 /*
-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-03 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-03 15:48 [lttng-dev] [PATCH lttng-tools 1/3] Fix: Add missing call rcu and read side lock David Goulet
2012-10-03 15:48 ` [lttng-dev] [PATCH lttng-tools 2/3] Add hash table argument to helper functions David Goulet
2012-10-03 16:29   ` Mathieu Desnoyers
2012-10-03 15:48 ` [lttng-dev] [PATCH lttng-tools 3/3] Fix: Stream allocation and insertion consistency David Goulet
2012-10-03 16:38   ` Mathieu Desnoyers
2012-10-03 16:42     ` David Goulet
2012-10-03 16:48       ` David Goulet
2012-10-03 17:06         ` Mathieu Desnoyers
2012-10-03 16:28 ` [lttng-dev] [PATCH lttng-tools 1/3] Fix: Add missing call rcu and read side lock Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox