Skip to content

perf/x86/amd: Check CPU hotplug setup and unwind failures

Ayush Yaduvanshi linux-perf-users lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2perf/x86/amd/power: Fix missing CPU hotplug setup check and cleanuparch/x86/events/amd/power.c+6 -30 replies
2/2perf/x86/amd/ibs: Fix missing CPU hotplug cleanup and unchecked init returnarch/x86/events/amd/ibs.c+21 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.53.0