]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/core: Simplify the perf_event_alloc() error path
authorPeter Zijlstra <peterz@infradead.org>
Mon, 4 Nov 2024 13:39:13 +0000 (14:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:10 +0000 (10:15 +0200)
commit7ef5aa081f989ecfecc1df02068a80aebbd3ec31
tree8beebcfa438a22dbc3ff12e89550b4843a538b03
parentc61feda3735068ad22422ffc7a81752e07d73fb1
perf/core: Simplify the perf_event_alloc() error path

[ Upstream commit c70ca298036c58a88686ff388d3d367e9d21acf0 ]

The error cleanup sequence in perf_event_alloc() is a subset of the
existing _free_event() function (it must of course be).

Split this out into __free_event() and simplify the error path.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Link: https://lore.kernel.org/r/20241104135517.967889521@infradead.org
Stable-dep-of: 56799bc03565 ("perf: Fix hang while freeing sigtrap event")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/perf_event.h
kernel/events/core.c