perf: Fix cgroup state vs ERROR
authorPeter Zijlstra <peterz@infradead.org>
Thu, 5 Jun 2025 10:37:11 +0000 (12:37 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 5 Jun 2025 12:37:52 +0000 (14:37 +0200)
commit61988e36dc5457cdff7ae7927e8d9ad1419ee998
tree66bea3af5a3c897d7e0222de685c829e39fc1adb
parent4f6fc782128355931527cefe3eb45338abd8ab39
perf: Fix cgroup state vs ERROR

While chasing down a missing perf_cgroup_event_disable() elsewhere,
Leo Yan found that both perf_put_aux_event() and
perf_remove_sibling_event() were also missing one.

Specifically, the rule is that events that switch to OFF,ERROR need to
call perf_cgroup_event_disable().

Unify the disable paths to ensure this.

Fixes: ab43762ef010 ("perf: Allow normal events to output AUX data")
Fixes: 9f0c4fa111dc ("perf/core: Add a new PERF_EV_CAP_SIBLING event capability")
Reported-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250605123343.GD35970@noisy.programming.kicks-ass.net
kernel/events/core.c