summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-07-16 22:46:08 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2023-07-16 22:46:08 +0200
commit1667e630c228ca2e7577de7a404c89de3d9f7772 (patch)
treefa314a90bbd2a5a0abe398fcca9813a7742a6f03 /arch
parentMerge tag 'objtool_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/scm/linux... (diff)
parentperf/x86: Fix lockdep warning in for_each_sibling_event() on SPR (diff)
downloadlinux-1667e630c228ca2e7577de7a404c89de3d9f7772.tar.xz
linux-1667e630c228ca2e7577de7a404c89de3d9f7772.zip
Merge tag 'perf_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Borislav Petkov: - Fix a lockdep warning when the event given is the first one, no event group exists yet but the code still goes and iterates over event siblings * tag 'perf_urgent_for_v6.5_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix lockdep warning in for_each_sibling_event() on SPR
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/events/intel/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index a149fafad813..2a284ba951b7 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3993,6 +3993,13 @@ static int intel_pmu_hw_config(struct perf_event *event)
struct perf_event *leader = event->group_leader;
struct perf_event *sibling = NULL;
+ /*
+ * When this memload event is also the first event (no group
+ * exists yet), then there is no aux event before it.
+ */
+ if (leader == event)
+ return -ENODATA;
+
if (!is_mem_loads_aux_event(leader)) {
for_each_sibling_event(sibling, leader) {
if (is_mem_loads_aux_event(sibling))