Fix RCU-related hangs: incorrect lttng_ht_destroy use
[lttng-tools.git] / src / bin / lttng-sessiond / session.c
index 17dc3544dbe55a4dac884b5af9f178e2f1c44991..b6b24b76c3f9ae28cec31d3c9e3224351647a2ef 100644 (file)
@@ -147,6 +147,7 @@ found:
  * Delete session from the session list and free the memory.
  *
  * Return -1 if no session is found.  On success, return 1;
+ * Should *NOT* be called with RCU read-side lock held.
  */
 int session_destroy(struct ltt_session *session)
 {
@@ -157,9 +158,7 @@ int session_destroy(struct ltt_session *session)
        del_session_list(session);
        pthread_mutex_destroy(&session->lock);
 
-       rcu_read_lock();
        consumer_destroy_output(session->consumer);
-       rcu_read_unlock();
        free(session);
 
        return LTTNG_OK;
This page took 0.022613 seconds and 4 git commands to generate.