*/
#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <common/common.h>
#include "ctf-trace.h"
/*
* 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)
{
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);
}