lkml.org 
[lkml]   [2022]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Perf: BUG: kernel NULL pointer dereference, address: 0000000000000198
On Thu, Nov 03, 2022 at 05:15:30PM +0530, Ravi Bangoria wrote:

> Sorry was distracted a bit. So, this seems to be happening because of
> race between amd_pmu_enable_all() and perf event NMI. Something like:
>
> amd_pmu_enable_all()
> {
> if (!test_bit(idx, cpuc->active_mask))
>
> --->/* perf NMI entry */
> ...
> x86_pmu_stop() {
> __clear_bit(hwc->idx, cpuc->active_mask);
> cpuc->events[hwc->idx] = NULL;
> }
> ...
> <---/* perf NMI exit */
>
> amd_pmu_enable_event(cpuc->events[idx]);
> }

Hmm, do you have more information? Something like that would require
calling amd_pmu_enable_all() while it is already active -- and that
seems suspect at first glance.

That is, you shouldn't be getting an NMI for @idx before
amd_pmu_enable_event().

\
 
 \ /
  Last update: 2022-11-03 13:34    [W:0.091 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site