From: Jérémie Galarneau Date: Sat, 15 Nov 2014 04:38:36 +0000 (-0500) Subject: Fix: HT must not be destroyed with a rcu_read_lock held X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f10db9cc56c280b504e5ece875c62da00d15722b;p=lttng-tools.git Fix: HT must not be destroyed with a rcu_read_lock held Signed-off-by: Jérémie Galarneau --- 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); }