[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3b1a1fb-03a4-4f67-9f44-9157ee421913@amd.com>
Date: Mon, 17 Feb 2025 13:54:59 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "mingo@...nel.org" <mingo@...nel.org>,
"lucas.demarchi@...el.com" <lucas.demarchi@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"willy@...radead.org" <willy@...radead.org>,
"acme@...nel.org" <acme@...nel.org>,
"namhyung@...nel.org" <namhyung@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"alexander.shishkin@...ux.intel.com" <alexander.shishkin@...ux.intel.com>,
"jolsa@...nel.org" <jolsa@...nel.org>,
"irogers@...gle.com" <irogers@...gle.com>,
"adrian.hunter@...el.com" <adrian.hunter@...el.com>,
"kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"Bangoria, Ravikumar" <ravi.bangoria@....com>
Subject: Re: [PATCH v2 24/24] perf: Make perf_pmu_unregister() useable
Hi Peter,
>> Apparently not, it ends up with:
>>
>> ------------[ cut here ]------------
>> WARNING: CPU: 145 PID: 5459 at kernel/events/core.c:281 event_function+0xd2/0xf0
>> WARNING: CPU: 145 PID: 5459 at kernel/events/core.c:286 event_function+0xd6/0xf0
>
>> remote_function+0x4f/0x70
>> generic_exec_single+0x7f/0x160
>> smp_call_function_single+0x110/0x160
>> event_function_call+0x98/0x1d0
>> _perf_event_disable+0x41/0x70
>> perf_event_for_each_child+0x40/0x90
>> _perf_ioctl+0xac/0xb00
>> perf_ioctl+0x45/0x80
>
> Took me a long while trying to blame this on the 'event->parent =
> NULL;', but AFAICT this is a new, unrelated issue.
>
> What I think happens is this perf_ioctl(DISABLE) vs pmu_detach_events()
> race, where the crux is that perf_ioctl() path does not take
> event2->mutex which allows the following interleave:
This one was only with perf_fuzzer, so pmu_detach_events() code path was
not invoked.
Thanks,
Ravi
Powered by blists - more mailing lists