From: Mathieu Desnoyers Date: Wed, 12 May 2021 14:45:12 +0000 (-0400) Subject: Fix: Backport of "Fix: increment buffer offset when failing to copy from user-space" X-Git-Tag: v2.12.6~8 X-Git-Url: https://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=8bbb8c9d83b2e11ef84e4df89f7cf06df43d23b9 Fix: Backport of "Fix: increment buffer offset when failing to copy from user-space" Private field was introduced in 2.13 only. Signed-off-by: Mathieu Desnoyers Change-Id: I7af440269feda5500651d6ecdc1f63007910cf3d --- diff --git a/lib/ringbuffer/backend.h b/lib/ringbuffer/backend.h index d8119110..bfadd94b 100644 --- a/lib/ringbuffer/backend.h +++ b/lib/ringbuffer/backend.h @@ -313,7 +313,7 @@ fill_buffer: * the pollution of static inline code. */ _lib_ring_buffer_memset(bufb, offset, 0, len, 0); - ctx->priv.buf_offset += len; + ctx->buf_offset += len; } /** @@ -396,7 +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->priv.buf_offset += len; + ctx->buf_offset += len; } /*