Skip to content

Commit 68f05b2

Browse files
committed
Merge tag 'perf-urgent-2024-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Thomas Gleixner: "perf_event_clear_cpumask() uses list_for_each_entry_rcu() without being in a RCU read side critical section, which triggers a 'suspicious RCU usage' warning. It turns out that the list walk does not be RCU protected because the write side lock is held in this context. Change it to a regular list walk" * tag 'perf-urgent-2024-11-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix missing RCU reader protection in perf_event_clear_cpumask()
2 parents 8f0b844 + e3dfd64 commit 68f05b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/events/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13959,7 +13959,7 @@ static void perf_event_clear_cpumask(unsigned int cpu)
1395913959
}
1396013960

1396113961
/* migrate */
13962-
list_for_each_entry_rcu(pmu, &pmus, entry, lockdep_is_held(&pmus_srcu)) {
13962+
list_for_each_entry(pmu, &pmus, entry) {
1396313963
if (pmu->scope == PERF_PMU_SCOPE_NONE ||
1396413964
WARN_ON_ONCE(pmu->scope >= PERF_PMU_MAX_SCOPE))
1396513965
continue;

0 commit comments

Comments
 (0)