summaryrefslogtreecommitdiff
path: root/kernel/bounds.c
diff options
context:
space:
mode:
authorVincent Donnefort <vdonnefort@google.com>2026-08-13 14:11:47 +0100
committerSteven Rostedt <rostedt@goodmis.org>2026-08-14 13:19:12 -0400
commite743527c5bfdceda1095bc0a9e596e2aebb6a9c3 (patch)
treecc3acbcc7af8df80b285d2d5d3e12d08b431e8e7 /kernel/bounds.c
parent8a5f63637890f03177146efddaba5ec7a1b4d61f (diff)
ring-buffer: Fix subbuf resize race with ring_buffer_alloc_read_page()
ring_buffer_alloc_read_page() is racy with ring_buffer_subbuf_order_set, it can allocate a reader page with an outdated order. This isn't a big issue, the user can still re-allocate a new reader page and try again. However, what is more problematic is if the value of subbuf_order changes in the middle of ring_buffer_alloc_read_page(). In that case, bpage->order might not match the actual allocated memory. Use bpage->order for the allocation to prevent this race. Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260813131152.3589632-6-vdonnefort@google.com Fixes: bce761d75745 ("ring-buffer: Read and write to ring buffers with custom sub buffer size") Reported-by: Sashiko <sashiko-bot@kernel.org> Signed-off-by: Vincent Donnefort <vdonnefort@google.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/bounds.c')
0 files changed, 0 insertions, 0 deletions