Commit 2565e42
perf/core: Fix pmus_lock vs. pmus_srcu ordering
Commit a63fbed ("perf/tracing/cpuhotplug: Fix locking order")
placed pmus_lock inside pmus_srcu, this makes perf_pmu_unregister()
trip lockdep.
Move the locking about such that only pmu_idr and pmus (list) are
modified while holding pmus_lock. This avoids doing synchronize_srcu()
while holding pmus_lock and all is well again.
Fixes: a63fbed ("perf/tracing/cpuhotplug: Fix locking order")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20241104135517.679556858@infradead.org1 parent df87d84 commit 2565e42
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11939 | 11939 | | |
11940 | 11940 | | |
11941 | 11941 | | |
| 11942 | + | |
| 11943 | + | |
11942 | 11944 | | |
11943 | 11945 | | |
11944 | 11946 | | |
| |||
11948 | 11950 | | |
11949 | 11951 | | |
11950 | 11952 | | |
11951 | | - | |
11952 | 11953 | | |
11953 | 11954 | | |
11954 | 11955 | | |
11955 | 11956 | | |
11956 | 11957 | | |
11957 | 11958 | | |
11958 | 11959 | | |
11959 | | - | |
11960 | 11960 | | |
11961 | 11961 | | |
11962 | 11962 | | |
| |||
0 commit comments