X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=62971067ce00f9d1b000580b4a7a10b45121d7ac;hp=8120b6df21188ea88331bba2a7c27c883d9b410d;hb=71e0a100af7369c2a56db35af7b864eeb5ca4f48;hpb=03f91eaa93943a28edb4dad33e9c8a5f2f6f8701 diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 8120b6df2..62971067c 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -2847,6 +2847,7 @@ error: * Create and send to the application the created buffers with per UID buffers. * * This MUST be called with a RCU read side lock acquired. + * The session list lock and the session's lock must be acquired. * * Return 0 on success else a negative value. */ @@ -2939,6 +2940,8 @@ static int create_channel_per_uid(struct ust_app *app, session = session_find_by_id(ua_sess->tracing_id); assert(session); + assert(pthread_mutex_trylock(&session->lock)); + assert(session_trylock_list()); cmd_ret = notification_thread_command_add_channel( notification_thread_handle, session->name, ua_sess->euid, ua_sess->egid, @@ -2970,6 +2973,7 @@ error: * Create and send to the application the created buffers with per PID buffers. * * Called with UST app session lock held. + * The session list lock and the session's lock must be acquired. * * Return 0 on success else a negative value. */ @@ -3032,6 +3036,9 @@ static int create_channel_per_pid(struct ust_app *app, chan_reg->consumer_key = ua_chan->key; pthread_mutex_unlock(®istry->lock); + assert(pthread_mutex_trylock(&session->lock)); + assert(session_trylock_list()); + cmd_ret = notification_thread_command_add_channel( notification_thread_handle, session->name, ua_sess->euid, ua_sess->egid,