Accept uid and gid parameters in utils_mkdir()/utils_mkdir_recursive()
[lttng-tools.git] / src / bin / lttng-relayd / session.c
index a9907c45d9c264a424b59646a08c47a9ffd033d3..46d9cc66a587cfe6bbbb4520998e605217295e74 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #define _GNU_SOURCE
+#define _LGPL_SOURCE
 #include <common/common.h>
 
 #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);
 }
This page took 0.024089 seconds and 4 git commands to generate.