From: Ayush Yaduvanshi <ayush37735@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Thomas Gleixner <tglx@kernel.org>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
"H . Peter Anvin" <hpa@zytor.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Ayush Yaduvanshi <ayush37735@gmail.com>
Subject: [PATCH 0/2] perf/x86/amd: Check CPU hotplug setup and unwind failures
Date: Fri, 13 Nov 2026 05:20:01 +0530 [thread overview]
Message-ID: <20261112235003.18608-1-ayush37735@gmail.com> (raw)
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
next reply other threads:[~2026-11-12 23:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 23:50 Ayush Yaduvanshi [this message]
2026-11-12 23:50 ` [PATCH 1/2] perf/x86/amd/power: Fix missing CPU hotplug setup check and cleanup Ayush Yaduvanshi
2026-11-13 0:04 ` sashiko-bot
2026-11-12 23:50 ` [PATCH 2/2] perf/x86/amd/ibs: Fix missing CPU hotplug cleanup and unchecked init return Ayush Yaduvanshi
2026-11-13 0:01 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112235003.18608-1-ayush37735@gmail.com \
--to=ayush37735@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox