linux/kernel/events
Peter Zijlstra ff5860f508 perf: Ensure swevent hrtimer is properly destroyed
With the change to hrtimer_try_to_cancel() in
perf_swevent_cancel_hrtimer() it appears possible for the hrtimer to
still be active by the time the event gets freed.

Make sure the event does a full hrtimer_cancel() on the free path by
installing a perf_event::destroy handler.

Fixes: eb3182ef04 ("perf/core: Fix system hang caused by cpu-clock usage")
Reported-by: CyberUnicorns <a101e_iotvul@163.com>
Tested-by: CyberUnicorns <a101e_iotvul@163.com>
Debugged-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2026-01-05 08:55:54 +01:00
..
callchain.c perf: Support deferred user unwind 2025-10-29 10:29:58 +01:00
core.c perf: Ensure swevent hrtimer is properly destroyed 2026-01-05 08:55:54 +01:00
hw_breakpoint.c perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type 2025-03-04 09:42:13 +01:00
hw_breakpoint_test.c perf/hw_breakpoint: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
internal.h perf: Convert mmap() refcounts to refcount_t 2025-08-15 13:13:02 +02:00
Makefile perf/hw_breakpoint: Add KUnit test for constraints accounting 2022-08-30 10:56:20 +02:00
ring_buffer.c perf: Convert mmap() refcounts to refcount_t 2025-08-15 13:13:02 +02:00
uprobes.c perf/uprobes: Remove <space><Tab> whitespace noise 2025-12-03 19:23:01 +01:00