Thread (15 messages) flat view 15 messages, 3 authors, 10d ago

Re: [PATCH v8 1/3] tracing: Fix subbuf resize races with trace_pipe_raw readers

From: Vincent Donnefort <hidden>
Date: 2026-08-27 06:31:29
Also in: sashiko-reviews

On Wed, Aug 26, 2026 at 02:31:23PM -0400, Steven Rostedt wrote:
On Wed, 26 Aug 2026 17:24:35 +0100
Vincent Donnefort [off-list ref] wrote:
quoted
quoted
This is a legitimate concern. But with an easy solution. Perhaps just add:

	if (full &&
	    (!read || (len < (size - read)) ||
-	     cpu_buffer->reader_page == cpu_buffer->commit_page))
+	     cpu_buffer->reader_page == cpu_buffer->commit_page) &&
+	    data_page->order == buffer->subbuf_order)
		return -1;

If the user is changing the buffer size at the same time as reading raw
pages, they get what they deserve! I just don't want to let the kernel go
into an infinite loop.

-- Steve
  
Sounds good. Do you prefer to get a v9 or you fold this into the existing commit?
Please send a v9. It makes the patchwork flow much better. If I modify a
patch, it makes patchwork not be able to automate the status updates as it
moves around git trees.

Thanks,

-- Steve
Looking at the function again, shouldn't we add !rb_is_static(cpu_buffer) as
well to the full page test?

-- 
Vincent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help