From: Jérémie Galarneau Date: Sun, 15 Sep 2019 19:10:20 +0000 (-0400) Subject: ust-consumer: fix: metadata stream lock taken before destroy X-Git-Tag: v2.12.0-rc1~373 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=16aa001d9a342adc6b913f854c0cee7a896a7e03;p=lttng-tools.git ust-consumer: fix: metadata stream lock taken before destroy The lock of a metadata stream is taken when calling the stream's destroy function after the completion of a snapshot. This is invalid and does not appear to protect anything. I am guessin that this was meant to be an 'unlock' invoked in the error path of this functions. Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index b64ad04aa..f8706d0ba 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -1079,7 +1079,6 @@ error_stream: * Clean up the stream completly because the next snapshot will use a new * metadata stream. */ - pthread_mutex_lock(&metadata_stream->lock); consumer_stream_destroy(metadata_stream, NULL); cds_list_del(&metadata_stream->send_node); metadata_channel->metadata_stream = NULL;