projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter
[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 4d38978c13aafc154186d0b9bf909bba443ef136..2a0b2004b758b17e87ec48f34ddfe7c24529b1ca 100644
(file)
--- a/
lib/ringbuffer/ring_buffer_frontend.c
+++ b/
lib/ringbuffer/ring_buffer_frontend.c
@@
-1015,7
+1015,7
@@
retry:
*/
if (((commit_count - chan->backend.subbuf_size)
& chan->commit_count_mask)
*/
if (((commit_count - chan->backend.subbuf_size)
& chan->commit_count_mask)
- - (buf_trunc(consumed
_cur
, chan)
+ - (buf_trunc(consumed, chan)
>> chan->backend.num_subbuf_order)
!= 0)
goto nodata;
>> chan->backend.num_subbuf_order)
!= 0)
goto nodata;
@@
-1024,7
+1024,7
@@
retry:
* Check that we are not about to read the same subbuffer in
* which the writer head is.
*/
* Check that we are not about to read the same subbuffer in
* which the writer head is.
*/
- if (subbuf_trunc(write_offset, chan) - subbuf_trunc(consumed
_cur
, chan)
+ if (subbuf_trunc(write_offset, chan) - subbuf_trunc(consumed, chan)
== 0)
goto nodata;
== 0)
goto nodata;
This page took
0.023902 seconds
and
4
git commands to generate.