projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: get consumer lock before closing/pushing metadata
[lttng-tools.git]
/
src
/
common
/
consumer.c
diff --git
a/src/common/consumer.c
b/src/common/consumer.c
index b5fe9831640217455c40c11b9e85e36b470ec05c..78b3f0799737139fc9067a601a39452e384b3e0e 100644
(file)
--- a/
src/common/consumer.c
+++ b/
src/common/consumer.c
@@
-1960,6
+1960,13
@@
void consumer_del_metadata_stream(struct lttng_consumer_stream *stream,
}
end:
}
end:
+ /*
+ * Nullify the stream reference so it is not used after deletion. The
+ * consumer data lock MUST be acquired before being able to check for a
+ * NULL pointer value.
+ */
+ stream->chan->metadata_stream = NULL;
+
pthread_mutex_unlock(&stream->lock);
pthread_mutex_unlock(&consumer_data.lock);
pthread_mutex_unlock(&stream->lock);
pthread_mutex_unlock(&consumer_data.lock);
This page took
0.025157 seconds
and
4
git commands to generate.