Re: [PATCH v2 1/3] tracing/remotes: Fix leak in trace_remote_alloc_buffer() error path
From: Steven Rostedt
Date: Thu Jul 09 2026 - 19:21:33 EST
On Thu, 9 Jul 2026 17:00:15 +0100
Vincent Donnefort <vdonnefort@xxxxxxxxxx> 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@xxxxxxxxxx>
> Signed-off-by: Vincent Donnefort <vdonnefort@xxxxxxxxxx>
This patch makes Sashiko find other possible issues with the code :-p
https://sashiko.dev/#/patchset/20260709160017.1729517-2-vdonnefort%40google.com
-- Steve