[PATCH 0/2] perf/x86/amd: Check CPU hotplug setup and unwind failures

From: Ayush Yaduvanshi

Date: Fri Nov 13 2026 - 00:15:44 EST


The AMD Power PMU and IBS drivers register CPU hotplug callbacks during
initialization. Both paths need to handle failures in later initialization
steps.

The Power PMU change checks the return value of cpuhp_setup_state() and
removes the hotplug state if perf_pmu_register() fails.

The IBS change checks cpuhp_setup_state(), removes the hotplug state if
perf_event_ibs_init() fails, unregisters the syscore operations registered
earlier, and clears ibs_caps on failure.

This series makes the initialization error paths unwind resources acquired
before failure.

Ayush Yaduvanshi (2):
perf/x86/amd/power: Fix missing CPU hotplug setup check and cleanup
perf/x86/amd/ibs: Fix missing CPU hotplug cleanup and unchecked init
return

arch/x86/events/amd/ibs.c | 26 +++++++++++++++++++++-----
arch/x86/events/amd/power.c | 9 ++++++---
2 files changed, 27 insertions(+), 8 deletions(-)

--
2.53.0