Fix: unbalanced ustconsumer32_data.pid_mutex lock
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 28 Jul 2014 00:38:50 +0000 (20:38 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 28 Jul 2014 17:48:02 +0000 (13:48 -0400)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/main.c

index a8751c696a62c58a5b634d2671be6971369dacde..1ee6f4a9f658f4cc547860ce5ac9f91a85c6e878 100644 (file)
@@ -3016,6 +3016,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) {
This page took 0.027449 seconds and 4 git commands to generate.