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:16 +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 841f5855a5bfa5fa71a105c5359dd69b3c7ca026..14dd1381ad036605f94fd75881b57b69693097e4 100644 (file)
@@ -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) {
This page took 0.02809 seconds and 4 git commands to generate.