Fix: set_relayd_for_snapshot does not acquire the consumer socket lock
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index ffd71bbac5cdb8af69e4d69a9af3f19d47fd2dbd..67b2e77f49c34ff690bf9467ad975c95c85ef59c 100644 (file)
@@ -3710,10 +3710,12 @@ static int set_relayd_for_snapshot(struct consumer_output *consumer,
        rcu_read_lock();
        cds_lfht_for_each_entry(snap_output->consumer->socks->ht, &iter.iter,
                        socket, node.node) {
+               pthread_mutex_lock(socket->lock);
                ret = send_consumer_relayd_sockets(0, session->id,
                                snap_output->consumer, socket,
                                session->name, session->hostname,
                                session->live_timer);
+               pthread_mutex_unlock(socket->lock);
                if (ret != LTTNG_OK) {
                        rcu_read_unlock();
                        goto error;
This page took 0.02583 seconds and 5 git commands to generate.