X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsession.c;h=bb3b63b3a31dc407d7dde1ba3c9680e74e221925;hb=670a26e4165562ab2dc5a16b9941f942e4f30996;hp=f8134f8ad966a950b0c97f13bbb18f2ba12d89b9;hpb=d7b377ed1acd4043bde353d99122e0e56fa4e975;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c index f8134f8ad..bb3b63b3a 100644 --- a/src/bin/lttng-sessiond/session.c +++ b/src/bin/lttng-sessiond/session.c @@ -574,8 +574,8 @@ struct lttng_trace_chunk *session_create_new_trace_chunk( const char *base_path; struct lttng_directory_handle *session_output_directory = NULL; const struct lttng_credentials session_credentials = { - .uid = session->uid, - .gid = session->gid, + .uid = LTTNG_OPTIONAL_INIT_VALUE(session->uid), + .gid = LTTNG_OPTIONAL_INIT_VALUE(session->gid), }; uint64_t next_chunk_id; const struct consumer_output *output; @@ -954,7 +954,7 @@ void session_release(struct urcu_ref *ref) * Must notify the kernel thread here to update it's poll set in order to * remove the channel(s)' fd just destroyed. */ - ret = notify_thread_pipe(kernel_poll_pipe[1]); + ret = notify_thread_pipe(the_kernel_poll_pipe[1]); if (ret < 0) { PERROR("write kernel poll pipe"); } @@ -989,6 +989,7 @@ void session_release(struct urcu_ref *ref) * Broadcast after free-ing to ensure the memory is * reclaimed before the main thread exits. */ + ASSERT_LOCKED(ltt_session_list.lock); pthread_cond_broadcast(<t_session_list.removal_cond); } }