Commit e54155d
committed
perf: Fix dangling cgroup pointer in cpuctx
JIRA: https://issues.redhat.com/browse/RHEL-78197
upstream
========
commit 3b7a34a
Author: Yeoreum Yun <yeoreum.yun@arm.com>
Date: Mon Jun 2 19:40:49 2025 +0100
description
===========
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/
Conflicts:
==========
Different context due to not (yet) backported da916e9 ("perf:
Make perf_pmu_unregister() useable")
Signed-off-by: Michael Petlan <mpetlan@redhat.com>1 parent dfd884f commit e54155d
1 file changed
+6
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2120 | 2120 | | |
2121 | 2121 | | |
2122 | 2122 | | |
2123 | | - | |
2124 | | - | |
2125 | | - | |
2126 | | - | |
2127 | | - | |
2128 | | - | |
2129 | | - | |
2130 | | - | |
2131 | | - | |
2132 | | - | |
2133 | | - | |
2134 | | - | |
2135 | 2123 | | |
2136 | 2124 | | |
2137 | 2125 | | |
| |||
2481 | 2469 | | |
2482 | 2470 | | |
2483 | 2471 | | |
2484 | | - | |
2485 | | - | |
| 2472 | + | |
2486 | 2473 | | |
2487 | | - | |
| 2474 | + | |
2488 | 2475 | | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
2489 | 2480 | | |
2490 | 2481 | | |
2491 | 2482 | | |
| |||
0 commit comments