From: Vincent Donnefort <vdonnefort@google.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mhiramat@kernel.org, linux-trace-kernel@vger.kernel.org,
mathieu.desnoyers@efficios.com, kernel-team@android.com,
linux-kernel@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH v2 1/3] tracing/remotes: Fix leak in trace_remote_alloc_buffer() error path
Date: Fri, 10 Jul 2026 12:56:32 +0100 [thread overview]
Message-ID: <alDd8OrrcI8vcPDL@google.com> (raw)
In-Reply-To: <alCm5fq3UC2JtzZV@google.com>
On Fri, Jul 10, 2026 at 09:01:41AM +0100, Vincent Donnefort wrote:
> On Fri, Jul 10, 2026 at 08:58:51AM +0100, Vincent Donnefort wrote:
> > On Thu, Jul 09, 2026 at 07:15:16PM -0400, Steven Rostedt wrote:
> > > On Thu, 9 Jul 2026 17:00:15 +0100
> > > Vincent Donnefort <vdonnefort@google.com> 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 <vdonnefort@google.com>
> > >
> > > This patch makes Sashiko find other possible issues with the code :-p
> > >
> > > https://sashiko.dev/#/patchset/20260709160017.1729517-2-vdonnefort%40google.com
> >
> > So one of them is fixed as part of "tracing/remotes: Add printk, dump_on_panic
> > and boot parameters" [1]. I can pull those fixes into this series instead.
> >
> > I'll look at the rest.
>
> Ha yes this other one is real too. However this is in arch/arm64/kvm/ so I'll
> post it separately to kvmarm.
Posted here: https://lore.kernel.org/all/20260710114819.2689386-3-vdonnefort@google.com/
Let me know if I should fold [1] into this series.
>
> >
> > [1] https://lore.kernel.org/all/20260605163825.1762953-2-vdonnefort@google.com/
> >
> > >
> > > -- Steve
next prev parent reply other threads:[~2026-07-10 11:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 16:00 [PATCH v2 0/3] tracing/remotes: Fix leak in trace_remote_alloc_buffer() error path Vincent Donnefort
2026-07-09 16:00 ` [PATCH v2 1/3] " Vincent Donnefort
2026-07-09 23:15 ` Steven Rostedt
2026-07-10 7:58 ` Vincent Donnefort
2026-07-10 8:01 ` Vincent Donnefort
2026-07-10 11:56 ` Vincent Donnefort [this message]
2026-07-10 12:37 ` Steven Rostedt
2026-07-09 16:00 ` [PATCH v2 2/3] tracing/remotes: Fix struct_len in trace_remote_alloc_buffer() Vincent Donnefort
2026-07-09 16:00 ` [PATCH v2 3/3] ring-buffer: Allow sparse CPU masks in ring_buffer_desc() Vincent Donnefort
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alDd8OrrcI8vcPDL@google.com \
--to=vdonnefort@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sashiko-bot@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox