Fix: session_list lock must be held to launch a rotation
[lttng-tools.git] / src / bin / lttng-sessiond / rotation-thread.c
index 25dbf76a932c3414f294848f2211a42e5e8659e3..3256a1e9b6581899380cb47f16cb35b10a90b32c 100644 (file)
@@ -642,7 +642,7 @@ end:
        return ret;
 }
 
-/* Call with the session lock held. */
+/* Call with the session and session_list locks held. */
 static
 int launch_session_rotation(struct ltt_session *session)
 {
@@ -736,10 +736,9 @@ int handle_job_queue(struct rotation_thread_handle *handle,
                }
 
                session_lock(session);
-               session_unlock_list();
-
                ret = run_job(job, session, handle->notification_thread_handle);
                session_unlock(session);
+               session_unlock_list();
                free(job);
                if (ret) {
                        goto end;
This page took 0.02378 seconds and 4 git commands to generate.