Fix: session list lock must be held on session put operation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 19 Dec 2018 18:47:23 +0000 (13:47 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 11 Feb 2019 20:08:47 +0000 (15:08 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/rotation-thread.c

index 8e63e160f980c15f8e60af0ea8f74d88a89e758e..6669372dd471210470138dbab6605907fa15019d 100644 (file)
@@ -761,9 +761,9 @@ int handle_job_queue(struct rotation_thread_handle *handle,
                         * possible for a job targeting that session to have
                         * already been queued before it was destroyed.
                         */
-                       session_unlock_list();
                        free(job);
                        session_put(session);
+                       session_unlock_list();
                        continue;
                }
 
@@ -832,7 +832,6 @@ int handle_condition(const struct lttng_condition *condition,
                goto end;
        }
        session_lock(session);
-       session_unlock_list();
 
        ret = unsubscribe_session_consumed_size_rotation(session,
                        notification_thread_handle);
@@ -861,6 +860,7 @@ int handle_condition(const struct lttng_condition *condition,
 end_unlock:
        session_unlock(session);
        session_put(session);
+       session_unlock_list();
 end:
        return ret;
 }
This page took 0.026394 seconds and 4 git commands to generate.