[lttng-dev] [PATCH lttng-tools] Fix: session list lock must be held on session put operation

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue Feb 12 11:22:41 EST 2019


Merged in master and stable-2.11.

Thanks!
Jérémie

On Wed, 19 Dec 2018 at 13:47, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  src/bin/lttng-sessiond/rotation-thread.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c
> index 8e63e160f..6669372dd 100644
> --- a/src/bin/lttng-sessiond/rotation-thread.c
> +++ b/src/bin/lttng-sessiond/rotation-thread.c
> @@ -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;
>  }
> --
> 2.17.1
>


-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list