Fix: set_relayd_for_snapshot does not acquire the consumer socket lock
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Feb 2018 21:05:18 +0000 (16:05 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 15 Feb 2018 20:13:28 +0000 (15:13 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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.027271 seconds and 4 git commands to generate.