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()
This commit is contained in:
@@ -13959,7 +13959,7 @@ static void perf_event_clear_cpumask(unsigned int cpu)
|
||||
}
|
||||
|
||||
/* migrate */
|
||||
list_for_each_entry_rcu(pmu, &pmus, entry, lockdep_is_held(&pmus_srcu)) {
|
||||
list_for_each_entry(pmu, &pmus, entry) {
|
||||
if (pmu->scope == PERF_PMU_SCOPE_NONE ||
|
||||
WARN_ON_ONCE(pmu->scope >= PERF_PMU_MAX_SCOPE))
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user