There's a complete rewrite of the core context handling in v6.2-rc1. find_pmu_context function used in this commit doesn't exist anymore. Also, let's first trust the upstream component, then work with them to get the issue solved if still present, re-introduce this patch with the old function only if extremely needed. This reverts commit 87b32477e514aa9030a405b168581ee11910ea83. --- kernel/events/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 930c99e4d89a..c3762a371dc6 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -11528,8 +11528,7 @@ void perf_pmu_unregister(struct pmu *pmu) device_del(pmu->dev); put_device(pmu->dev); } - if (!find_pmu_context(pmu->task_ctx_nr)) - free_pmu_context(pmu); + free_pmu_context(pmu); mutex_unlock(&pmus_lock); } EXPORT_SYMBOL_GPL(perf_pmu_unregister); -- 2.38.1