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 <chris@chris-wilson.co.uk> Cc: David Carrillo-Cisneros <davidcc@google.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: <stable@vger.kernel.org> # v4.11+ Link: http://patchwork.freedesktop.org/patch/msgid/20170512114525.17575-1-chris@chris-wilson.co.uk
- Loading branch information