• Prarit Bhargava's avatar
    perf/x86/intel/uncore: Fix hardcoded socket 0 assumption in the Haswell init code · 6d6daa20
    Prarit Bhargava authored
    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: cf6d445f
     ("perf/x86/uncore: Track packages, not per CPU data")
    Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Harish Chegondi <harish.chegondi@intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Kan Liang <kan.liang@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1483628965-2890-1-git-send-email-prarit@redhat.com
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
uncore_snbep.c 115 KB