From: Mathieu Desnoyers Date: Mon, 28 Jul 2014 00:38:50 +0000 (-0400) Subject: Fix: unbalanced ustconsumer32_data.pid_mutex lock X-Git-Tag: v2.4.3~56 X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=f0601a08249eeed11e0f843d74984f4eb9c303c9 Fix: unbalanced ustconsumer32_data.pid_mutex lock It is never locked in this function, but should be. This is triggering spurious runtime failures on my system, where it seems that sessiond was sometimes breaking the communication pipe with liblttng-ctl when the unbalanced unlock is reached. This should be backported to stable-2.4 and stable-2.5. Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 841f5855a..14dd1381a 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2894,6 +2894,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock, } /* 32-bit */ + pthread_mutex_lock(&ustconsumer32_data.pid_mutex); if (consumerd32_bin[0] != '\0' && ustconsumer32_data.pid == 0 && cmd_ctx->lsm->cmd_type != LTTNG_REGISTER_CONSUMER) {