]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/core: Fix the WARN_ON_ONCE is out of lock protected region
authorLuo Gengkun <luogengkun@huaweicloud.com>
Thu, 26 Jun 2025 13:54:03 +0000 (13:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:35:08 +0000 (18:35 +0200)
commit71eb118baf6edeee2595a2f05a8ce2f472535714
treecae52305ef87a0fe56699b117d4683c3d17ad4d4
parent407f1073ea23c537a105a024d7e1a684bced0447
perf/core: Fix the WARN_ON_ONCE is out of lock protected region

[ Upstream commit 7b4c5a37544ba22c6ebe72c0d4ea56c953459fa5 ]

commit 3172fb986666 ("perf/core: Fix WARN in perf_cgroup_switch()") try to
fix a concurrency problem between perf_cgroup_switch and
perf_cgroup_event_disable. But it does not to move the WARN_ON_ONCE into
lock-protected region, so the warning is still be triggered.

Fixes: 3172fb986666 ("perf/core: Fix WARN in perf_cgroup_switch()")
Signed-off-by: Luo Gengkun <luogengkun@huaweicloud.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250626135403.2454105-1-luogengkun@huaweicloud.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/events/core.c