Add missing mutex lock for kconsumerd pid
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 21:27:50 +0000 (17:27 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 21:27:50 +0000 (17:27 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index 32e47068efc31eacc56cb8e77660f0047892348b..8c09339aba2c80d79f60fdb88afbf4481b3ee1e5 100644 (file)
@@ -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:
This page took 0.028012 seconds and 4 git commands to generate.