Fix: ring buffer: get_subbuf() checks should be performed on "consumed" parameter
[lttng-ust.git] / libringbuffer / ring_buffer_frontend.c
index 496c751da57b617531d09321efaa810d8d330e45..f1118f093584c234feee0a1aa668979956916ce4 100644 (file)
@@ -1107,7 +1107,7 @@ retry:
         */
        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;
@@ -1116,7 +1116,7 @@ retry:
         * 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;
 
This page took 0.023617 seconds and 4 git commands to generate.