Commit 1dfab14
perf: Fix dangling cgroup pointer in cpuctx
mainline inclusion
from mainline-v6.16-rc3
commit 12b6c62
category: bugfix
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=12b6c62c038e85354154aee4eb2cf7a2168b3ecc
--------------------------------
Commit a3c3c66("perf/core: Fix child_total_time_enabled accounting
bug at task exit") moves the event->state update to before
list_del_event(). This makes the event->state test in list_del_event()
always false; never calling perf_cgroup_event_disable().
As a result, cpuctx->cgrp won't be cleared properly; causing havoc.
Fixes: a3c3c66("perf/core: Fix child_total_time_enabled accounting bug at task exit")
Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: David Wang <00107082@163.com>
Link: https://lore.kernel.org/all/aD2TspKH%2F7yvfYoO@e129823.arm.com/
(cherry picked from commit 3b7a34a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Conflicts:
kernel/events/core.c1 parent 19a90fb commit 1dfab14
1 file changed
Lines changed: 6 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2056 | 2056 | | |
2057 | 2057 | | |
2058 | 2058 | | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | 2059 | | |
2072 | 2060 | | |
2073 | 2061 | | |
| |||
2381 | 2369 | | |
2382 | 2370 | | |
2383 | 2371 | | |
2384 | | - | |
2385 | | - | |
| 2372 | + | |
2386 | 2373 | | |
2387 | | - | |
| 2374 | + | |
2388 | 2375 | | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
2389 | 2380 | | |
2390 | 2381 | | |
2391 | 2382 | | |
| |||
0 commit comments