From a8fda35ff54b32dceed51f4a9bb59ab2ce1c47bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 26 Feb 2015 23:09:35 -0500 Subject: [PATCH] Docs: connection_find_by_sock() must be called with rcu_read_lock MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-relayd/connection.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/lttng-relayd/connection.c b/src/bin/lttng-relayd/connection.c index 2376a3f29..76e48a6ab 100644 --- a/src/bin/lttng-relayd/connection.c +++ b/src/bin/lttng-relayd/connection.c @@ -32,6 +32,10 @@ static void rcu_free_connection(struct rcu_head *head) connection_free(conn); } +/* + * Must be called with a read side lock held. The read side lock must be + * kept until the returned relay_connection is no longer in use. + */ struct relay_connection *connection_find_by_sock(struct lttng_ht *ht, int sock) { struct lttng_ht_node_ulong *node; -- 2.34.1