Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: sashiko-bot@kernel.org
Cc: sashiko-reviews@lists.linux.dev, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Take trace_array reference when opening options file
Date: Tue, 1 Sep 2026 20:32:43 -0400	[thread overview]
Message-ID: <20260901203243.350c2e8a@robin> (raw)
In-Reply-To: <20260901191339.25a5a060@robin>

On Tue, 1 Sep 2026 19:13:39 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> > For example, if a user opens a per-instance tracing_max_latency file,
> > keeps the descriptor open, and the instance is removed, could a
> > subsequent write dereference the freed memory?

Not sure what tree you are looking at.

> > 
> > kernel/trace/trace.c:tracing_max_lat_write() {

That function has been moved to trace_snapshot.c

> >     ...
> >     return tracing_nsecs_write(filp->private_data, ubuf, cnt, ppos);
> > }
> > 
> > Where tracing_nsecs_write would perform an unlocked write to the
> > freed pointer?  

and this has been fixed by:

  7d660c9b2bc95 ("tracing: Have tracing_max_latency inc the trace array ref count")

That was added in 2023.

-- Steve

  reply	other threads:[~2026-09-02  0:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 20:36 [PATCH] tracing: Take trace_array reference when opening options file Steven Rostedt
2026-09-01 20:54 ` sashiko-bot
2026-09-01 23:13   ` Steven Rostedt
2026-09-02  0:32     ` Steven Rostedt [this message]
2026-09-02 10:36 ` kernel test robot
2026-09-02 13:47   ` Steven Rostedt

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=20260901203243.350c2e8a@robin \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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