diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-11-24 04:16:42 +0100 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-11-23 20:07:41 -1000 |
| commit | c99f50e4acf86bfbbe313d79f281d83be1763260 (patch) | |
| tree | 0d53881e0b1d9c90a4325896aa01ff4656c57395 /tools/perf/scripts/python/flamegraph.py | |
| parent | 884e88175b95a03ea9f4dc8c89acca5d5b33cbd2 (diff) | |
cgroup/rstat: disable preemption in css_rstat_updated()
BPF programs can call css_rstat_updated() with preemption enabled.
The kfunc calls __css_rstat_updated(), which requires preemption to
be disabled while it queues an rstat update. A cgroup iterator can
hit the lockdep assertion on both RT and non-RT kernels. The
cgroup_hierarchical_stats selftest can also hit it on PREEMPT_RT:
spin_lock_irqsave() on trace_cgroup_path_lock leaves preemption and
interrupts enabled there.
Disable preemption in the BPF wrapper after validating the CPU and
before calling __css_rstat_updated().
Fixes: 36df6e3dbd7e ("cgroup: make css_rstat_updated nmi safe")
Reported-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Closes: https://lore.kernel.org/r/20251119111402.153727-1-jiayuan.chen@linux.dev/
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
