From f10db9cc56c280b504e5ece875c62da00d15722b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 14 Nov 2014 23:38:36 -0500 Subject: [PATCH] Fix: HT must not be destroyed with a rcu_read_lock held 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/session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-relayd/session.c b/src/bin/lttng-relayd/session.c index a9907c45d..984073c62 100644 --- a/src/bin/lttng-relayd/session.c +++ b/src/bin/lttng-relayd/session.c @@ -153,6 +153,9 @@ void session_try_destroy(struct lttng_ht *ht, struct relay_session *session) /* * Destroy a session object. + * + * This function must *NOT* be called with an RCU read lock held since + * the session's ctf_traces_ht is destroyed. */ void session_destroy(struct relay_session *session) { @@ -173,8 +176,8 @@ void session_destroy(struct relay_session *session) ctf_trace_delete(session->ctf_traces_ht, ctf_trace); ctf_trace_destroy(ctf_trace); } - lttng_ht_destroy(session->ctf_traces_ht); rcu_read_unlock(); + lttng_ht_destroy(session->ctf_traces_ht); call_rcu(&session->rcu_node, rcu_destroy_session); } -- 2.34.1