Dear Stable,

> Concurrent subbuffer resizes may crash trace_pipe_raw readers or leak
> uninitialized memory to userspace due to stale size values.
> 
> Modify ring_buffer_alloc_read_page() to let it handle the resizing of
> a previous buffer_data_read_page if necessary and add a new
> ring_buffer_read_page_size() which enable ring-buffer users to not use
> the racy ring_buffer_subbuf_size_get(). This makes the spare_size member
> of ftrace_buffer_info redundant.
> 
> Use those functions in trace_pipe_raw readers and handle in both the
> case where the subbuf order is modified in the middle of the read.
> 
> Fixes: bce761d75745 ("ring-buffer: Read and write to ring buffers with custom 
> sub buffer size")
> Signed-off-by: Vincent Donnefort <[email protected]>

Not sure if this is the latest version or not?

I see review comments, but no v6.  Anyway, no matter, it'll do.

Could we have this applied to Stable please:

8a5f63637890 ("ring-buffer: Fix subbuf resize race with ring buffer readers")

-- 
Lee Jones

Reply via email to