From: Aditya Chillara <quic_achillar@quicinc.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] tracing/perf: Prevent double unregister of perf probes
Date: Fri, 18 Jul 2025 13:05:48 +0530 [thread overview]
Message-ID: <2bbdd0fa-58cf-41ad-a297-125987ff2fbc@quicinc.com> (raw)
In-Reply-To: <20250709131854.5eccda2b@batman.local.home>
[ Added Peter for 7ef5aa081f98 and kernel/events/core.c ]
On 7/9/2025 10:48 PM, Steven Rostedt wrote:
> On Wed, 9 Jul 2025 22:20:00 +0530
> Aditya Chillara <quic_achillar@quicinc.com> wrote:
>
>> The exact problem was introduced by:
>> https://github.com/torvalds/linux/commit/7ef5aa081f989ecfecc1df02068a80aebbd3ec31
>> (perf/core: Simplify the perf_event_alloc() error path)
>> where __free_event was calling event->destroy() even though it would
>> have been called by perf_try_init_event in case it failed.
>
> Then I rather have it trigger a WARN_ON() and disable that event
> permanently until reboot. It's a bug, no need to continue using the
> event when it's in an a bad state.
perf_trace_event_unreg is called only in event->destroy(), and this is
called in event free path; either after the event is removed from its
context, or before the event is installed in a context. I believe there
is no need to explicitly disable the perf event here because it must
have been disabled already. Please let me know if I'm missing anything.
Best Regards,
Aditya
next prev parent reply other threads:[~2025-07-18 7:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 5:41 [PATCH 0/2] tracing/perf: Prevent double unregister of perf and tracepoint probes Aditya Chillara
2025-07-09 5:41 ` [PATCH 1/2] tracing/perf: Prevent double unregister of perf probes Aditya Chillara
2025-07-09 14:23 ` Steven Rostedt
2025-07-09 16:50 ` Aditya Chillara
2025-07-09 17:18 ` Steven Rostedt
2025-07-11 18:40 ` Aditya Chillara
2025-07-18 7:35 ` Aditya Chillara [this message]
2025-07-09 5:41 ` [PATCH 2/2] tracing: Prevent double unregister of tracepoint probes Aditya Chillara
2025-07-09 14:40 ` Steven Rostedt
2025-07-09 14:51 ` Steven Rostedt
2025-07-09 14:51 ` Mathieu Desnoyers
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=2bbdd0fa-58cf-41ad-a297-125987ff2fbc@quicinc.com \
--to=quic_achillar@quicinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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