Patch "perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code" has been added to the 4.9-stable tree
From: <gregkh@linuxfoundation.org>
Date: 2017-01-17 10:43:14
This is a note to let you know that I've just added the patch titled
perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
perf-x86-intel-uncore-fix-hardcoded-socket-0-assumption-in-the-haswell-init-code.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let [off-list ref] know about it.
From 6d6daa20945f3f598e56e18d1f926c08754f5801 Mon Sep 17 00:00:00 2001
From: Prarit Bhargava <redacted>
Date: Thu, 5 Jan 2017 10:09:25 -0500
Subject: perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code
From: Prarit Bhargava <redacted>
commit 6d6daa20945f3f598e56e18d1f926c08754f5801 upstream.
hswep_uncore_cpu_init() uses a hardcoded physical package id 0 for the boot
cpu. This works as long as the boot CPU is actually on the physical package
0, which is normaly the case after power on / reboot.
But it fails with a NULL pointer dereference when a kdump kernel is started
on a secondary socket which has a different physical package id because the
locigal package translation for physical package 0 does not exist.
Use the logical package id of the boot cpu instead of hard coded 0.
[ tglx: Rewrote changelog once more ]
Fixes: cf6d445f6897 ("perf/x86/uncore: Track packages, not per CPU data")
Signed-off-by: Prarit Bhargava <redacted>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <redacted>
Cc: Borislav Petkov <redacted>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Harish Chegondi <redacted>
Cc: Jiri Olsa <redacted>
Cc: Kan Liang <redacted>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <redacted>
Cc: Thomas Gleixner <redacted>
Cc: Vince Weaver <redacted>
Link: http://lkml.kernel.org/r/1483628965-2890-1-git-send-email-prarit@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/events/intel/uncore_snbep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c@@ -2686,7 +2686,7 @@ static struct intel_uncore_type *hswep_m void hswep_uncore_cpu_init(void) { - int pkg = topology_phys_to_logical_pkg(0); + int pkg = boot_cpu_data.logical_proc_id; if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores) hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
Patches currently in stable-queue which might be from prarit@redhat.com are queue-4.9/perf-x86-intel-uncore-fix-hardcoded-socket-0-assumption-in-the-haswell-init-code.patch