summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriele Paoloni <gabriele.paoloni@intel.com>2020-11-27 16:18:17 +0000
committerBorislav Petkov <bp@suse.de>2020-12-01 18:49:29 +0100
commit3a866b16fd2360a9c4ebf71cfbf7ebfe968c1409 (patch)
treee9b4169a8a7e1c61166028f74031c274b55ec465
parente273e6e12ab1db3eb57712bd60655744d0091fa3 (diff)
downloadlinux-3a866b16fd2360a9c4ebf71cfbf7ebfe968c1409.tar.bz2
x86/mce: Panic for LMCE only if mca_cfg.tolerant < 3
Right now for LMCE, if no_way_out is set, mce_panic() is called regardless of mca_cfg.tolerant. This is not correct as, if mca_cfg.tolerant = 3, the code should never panic. Add that check. [ bp: use local ptr 'cfg'. ] Signed-off-by: Gabriele Paoloni <gabriele.paoloni@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Link: https://lkml.kernel.org/r/20201127161819.3106432-4-gabriele.paoloni@intel.com
-rw-r--r--arch/x86/kernel/cpu/mce/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index ebaa52a0c024..99da2e0b595b 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1368,7 +1368,7 @@ noinstr void do_machine_check(struct pt_regs *regs)
* to see it will clear it.
*/
if (lmce) {
- if (no_way_out)
+ if (no_way_out && cfg->tolerant < 3)
mce_panic("Fatal local machine check", &m, msg);
} else {
order = mce_start(&no_way_out);