projects
/
lttng-ust.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-ust.git]
/
libringbuffer
/
ring_buffer_frontend.c
diff --git
a/libringbuffer/ring_buffer_frontend.c
b/libringbuffer/ring_buffer_frontend.c
index 2258400ee9c5c92f6048f53a79df6bd9d90bdceb..df8ddf7f01c6f26be5e011b11372f95bf535e0da 100644
(file)
--- a/
libringbuffer/ring_buffer_frontend.c
+++ b/
libringbuffer/ring_buffer_frontend.c
@@
-823,7
+823,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;
@@
-832,7
+832,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.023377 seconds
and
4
git commands to generate.