Fix: Backport of "Fix: increment buffer offset when failing to copy from user-space"
[lttng-modules.git] / lib / ringbuffer / backend.h
index 855f1e017a2f5aa6936a7aa9ce521c31d9c1e1e7..bfadd94b99fbe40760e64a75a64dfb6b5fd1361d 100644 (file)
@@ -313,6 +313,7 @@ fill_buffer:
         * the pollution of static inline code.
         */
        _lib_ring_buffer_memset(bufb, offset, 0, len, 0);
+       ctx->buf_offset += len;
 }
 
 /**
@@ -395,6 +396,7 @@ fill_buffer:
        _lib_ring_buffer_memset(bufb, offset, pad, len - 1, 0);
        offset += len - 1;
        _lib_ring_buffer_memset(bufb, offset, '\0', 1, 0);
+       ctx->buf_offset += len;
 }
 
 /*
This page took 0.023503 seconds and 4 git commands to generate.