Thread (9 messages) 9 messages, 2 authors, 4d ago

Re: [PATCH v2 1/3] tracing/remotes: Fix leak in trace_remote_alloc_buffer() error path

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-07-09 23:21:22
Also in: lkml

On Thu,  9 Jul 2026 17:00:15 +0100
Vincent Donnefort [off-list ref] wrote:
If page allocation fails in trace_remote_alloc_buffer(), desc->nr_cpus
is not yet incremented for the current CPU. As a consequence, on error,
half-allocated rb_desc will not be freed in trace_remote_free_buffer().

Increment desc->nr_cpus as soon as the first allocation for the current
CPU has succeeded.

Fixes: 96e43537af54 ("tracing: Introduce trace remotes")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Signed-off-by: Vincent Donnefort <redacted>
This patch makes Sashiko find other possible issues with the code :-p

  https://sashiko.dev/#/patchset/20260709160017.1729517-2-vdonnefort%40google.com

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