From: Jérémie Galarneau Date: Fri, 27 Feb 2015 04:09:35 +0000 (-0500) Subject: Docs: connection_find_by_sock() must be called with rcu_read_lock X-Git-Tag: v2.6.1~116 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7c29c8996c12d5307bd61885366b5a167b767704;p=lttng-tools.git Docs: connection_find_by_sock() must be called with rcu_read_lock Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/connection.c b/src/bin/lttng-relayd/connection.c index 4cf87ad34..477117b3d 100644 --- a/src/bin/lttng-relayd/connection.c +++ b/src/bin/lttng-relayd/connection.c @@ -31,6 +31,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;