Re: [PATCH] powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu'

From: Madhavan Srinivasan
Date: Thu Mar 13 2025 - 23:48:19 EST


On Tue, 04 Feb 2025 21:05:26 +0530, Vaibhav Jain wrote:
> Commit 176cda0619b6 ("powerpc/perf: Add perf interface to expose vpa
> counters") introduced 'vpa_pmu' to expose Book3s-HV nested APIv2 provided
> L1<->L2 context switch latency counters to L1 user-space via
> perf-events. However the newly introduced PMU named 'vpa_pmu' doesn't
> assign ownership of the PMU to the module 'vpa_pmu'. Consequently the
> module 'vpa_pmu' can be unloaded while one of the perf-events are still
> active, which can lead to kernel oops and panic of the form below on a
> Pseries-LPAR:
>
> [...]

Applied to powerpc/next.

[1/1] powerpc/perf: Fix ref-counting on the PMU 'vpa_pmu'
https://git.kernel.org/powerpc/c/ff99d5b6a246715f2257123cdf6c4a29cb33aa78

Thanks