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()

+1 -1
+1 -1
kernel/events/core.c
··· 13959 } 13960 13961 /* migrate */ 13962 - list_for_each_entry_rcu(pmu, &pmus, entry, lockdep_is_held(&pmus_srcu)) { 13963 if (pmu->scope == PERF_PMU_SCOPE_NONE || 13964 WARN_ON_ONCE(pmu->scope >= PERF_PMU_MAX_SCOPE)) 13965 continue;
··· 13959 } 13960 13961 /* migrate */ 13962 + list_for_each_entry(pmu, &pmus, entry) { 13963 if (pmu->scope == PERF_PMU_SCOPE_NONE || 13964 WARN_ON_ONCE(pmu->scope >= PERF_PMU_MAX_SCOPE)) 13965 continue;