]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/MCE/AMD: Fix the thresholding machinery initialization order
authorBorislav Petkov <bp@suse.de>
Tue, 27 Nov 2018 13:41:37 +0000 (14:41 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 24 Jun 2019 14:21:33 +0000 (16:21 +0200)
commit628cf0d46a9108bd2569de906d5b867cb6a6513f
tree618b246c07ae4b047a3455208917845a9272ebc0
parentdd75d0bbd03670a03859129bc99489657674e8b1
x86/MCE/AMD: Fix the thresholding machinery initialization order

BugLink: https://bugs.launchpad.net/bugs/1819485
Currently, the code sets up the thresholding interrupt vector and only
then goes about initializing the thresholding banks. Which is wrong,
because an early thresholding interrupt would cause a NULL pointer
dereference when accessing those banks and prevent the machine from
booting.

Therefore, set the thresholding interrupt vector only *after* having
initialized the banks successfully.

Fixes: 18807ddb7f88 ("x86/mce/AMD: Reset Threshold Limit after logging error")
Reported-by: Rafał Miłecki <rafal@milecki.pl>
Reported-by: John Clemens <clemej@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Rafał Miłecki <rafal@milecki.pl>
Tested-by: John Clemens <john@deater.net>
Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com>
Cc: linux-edac@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: Tony Luck <tony.luck@intel.com>
Cc: x86@kernel.org
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Link: https://lkml.kernel.org/r/20181127101700.2964-1-zajec5@gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=201291
(cherry picked from commit 60c8144afc287ef09ce8c1230c6aa972659ba1bb)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/kernel/cpu/mcheck/mce_amd.c