Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf/core: Avoid removing shared pmu_context on unregister
In commit 1fd7e41 ("perf/core: Remove perf_cpu_context::unique_pmu"), the search for another user of the pmu_cpu_context was removed, and so we unconditionally free it during perf_pmu_unregister. This leads to random corruption later and a BUG at mm/percpu.c:689. v2: Check for shared pmu_contexts under the mutex. Fixes: 1fd7e41 ("perf/core: Remove perf_cpu_context::unique_pmu") Signed-off-by: Chris Wilson <[email protected]> Cc: David Carrillo-Cisneros <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: <[email protected]> # v4.11+ Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
- Loading branch information