• Peter Zijlstra's avatar
    perf/core: Fix perf_pmu_unregister() locking · a9f97721
    Peter Zijlstra authored
    When we unregister a PMU, we fail to serialize the @pmu_idr properly.
    Fix that by doing the entire thing under pmu_lock.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Fixes: 2e80a82a ("perf: Dynamic pmu types")
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    a9f97721
core.c 279 KB