X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fsession.c;h=984073c62b6cc29ed6c300d1c7446b1273ce0585;hb=89f0d918c583fc08f079f0c45f50498ba61a240f;hp=a9907c45d9c264a424b59646a08c47a9ffd033d3;hpb=204ce14b8b883eb25afbdf9336e5cd3d7f8b8fb9;p=lttng-tools.git 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); }