From: David Goulet Date: Tue, 4 Oct 2011 21:27:50 +0000 (-0400) Subject: Add missing mutex lock for kconsumerd pid X-Git-Tag: v2.0-pre15~195 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4c93ba8b8e253ffa3943f4999bd912b535c40b88;p=lttng-tools.git Add missing mutex lock for kconsumerd pid Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 32e47068e..8c09339ab 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -2606,14 +2606,17 @@ static int process_client_msg(struct command_ctx *cmd_ctx) } /* Start the kernel consumer daemon */ + pthread_mutex_lock(&kconsumerd_pid_mutex); if (kconsumerd_pid == 0 && cmd_ctx->lsm->cmd_type != LTTNG_REGISTER_CONSUMER) { + pthread_mutex_unlock(&kconsumerd_pid_mutex); ret = start_kconsumerd(); if (ret < 0) { ret = LTTCOMM_KERN_CONSUMER_FAIL; goto error; } } + pthread_mutex_unlock(&kconsumerd_pid_mutex); } break; case LTTNG_DOMAIN_UST_PID: