diff options
| author | David Carlier <devnexen@gmail.com> | 2026-09-16 20:26:28 +0100 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-10-15 19:53:48 -0400 |
| commit | 453d0f47b174cac387af48d303c503b84f82212e (patch) | |
| tree | 31f4dd9adc48ea47848cf7df874c321faf8f2813 /scripts/basic/split-include.c | |
| parent | 9dce3e2d1fca0298ce5ee3ec7f47d78e2e3f8b78 (diff) | |
| download | linux-453d0f47b174cac387af48d303c503b84f82212e.tar.gz linux-453d0f47b174cac387af48d303c503b84f82212e.zip | |
ring-buffer: Take cpus_read_lock() when changing the subbuf order
A CPU coming online for the first time gets its per CPU buffer allocated
by trace_rb_cpu_prepare(), which then adds it to buffer->cpumask. If that
happens while ring_buffer_subbuf_order_set() is running, the CPU shows up
after the allocation loop and the install loop walks it with an empty
new_pages list, corrupting the buffer.
Take cpus_read_lock() as ring_buffer_resize() does.
Cc: stable@vger.kernel.org
Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page")
Link: https://patch.msgid.link/20260916192628.274136-1-devnexen@gmail.com
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
