The timer.h functions are documented as needing the session_list
lock to be held. Since timers are setup during the launch of a
rotation, the session_list lock must be taken while a job is
executed by the rotation thread.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
-/* Call with the session lock held. */
+/* Call with the session and session_list locks held. */
static
int launch_session_rotation(struct ltt_session *session)
{
static
int launch_session_rotation(struct ltt_session *session)
{
- session_unlock_list();
-
ret = run_job(job, session, handle->notification_thread_handle);
session_unlock(session);
ret = run_job(job, session, handle->notification_thread_handle);
session_unlock(session);
free(job);
if (ret) {
goto end;
free(job);
if (ret) {
goto end;