[GIT pull] perf/urgent for v6.12-rc6

Thomas Gleixner posted 1 patch 3 weeks ago
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[GIT pull] perf/urgent for v6.12-rc6
Posted by Thomas Gleixner 3 weeks ago
Linus,

please pull the latest perf/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2024-11-03

up to:  e3dfd64c1f34: perf: Fix missing RCU reader protection in perf_event_clear_cpumask()

A single fix for perf:

  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 contxt.

  Change it to a regular list walk.

Thanks,

	tglx

------------------>
Kan Liang (1):
      perf: Fix missing RCU reader protection in perf_event_clear_cpumask()


 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index cdd09769e6c5..df27d08a7232 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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;
Re: [GIT pull] perf/urgent for v6.12-rc6
Posted by pr-tracker-bot@kernel.org 2 weeks, 6 days ago
The pull request you sent on Sun,  3 Nov 2024 11:31:00 +0100 (CET):

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-2024-11-03

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/68f05b251b7156b10a6f6547f7f8672ffb94100f

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html