projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
print warning and return -EBUSY on double get_subbuf()
[lttng-modules.git]
/
lib
/
ringbuffer
/
ring_buffer_frontend.c
diff --git
a/lib/ringbuffer/ring_buffer_frontend.c
b/lib/ringbuffer/ring_buffer_frontend.c
index bff920d16a0f6a7a40d3eb2325bb9612a5639273..84341adcd4da6b2b6a06e5e286179d13a90be42b 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_frontend.c
+++ b/
lib/ringbuffer/ring_buffer_frontend.c
@@
-927,6
+927,13
@@
int lib_ring_buffer_get_subbuf(struct lib_ring_buffer *buf,
int ret;
int finalized;
+ if (buf->get_subbuf) {
+ /*
+ * Reader is trying to get a subbuffer twice.
+ */
+ CHAN_WARN_ON(chan, 1);
+ return -EBUSY;
+ }
retry:
finalized = ACCESS_ONCE(buf->finalized);
/*
This page took
0.02358 seconds
and
4
git commands to generate.