X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fsession.c;h=46d9cc66a587cfe6bbbb4520998e605217295e74;hb=d00b982bd5afb45511b9ca6e0a94e7b148518705;hp=a9907c45d9c264a424b59646a08c47a9ffd033d3;hpb=78394403b4986dc86733d2106e68405f13fa31d5;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/session.c b/src/bin/lttng-relayd/session.c index a9907c45d..46d9cc66a 100644 --- a/src/bin/lttng-relayd/session.c +++ b/src/bin/lttng-relayd/session.c @@ -17,6 +17,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include "ctf-trace.h" @@ -153,6 +154,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 +177,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); }