Linux-EDAC Archive on
 help / color / Atom feed
* [PATCH 4.19 074/114] x86/mce: Fix possibly incorrect severity calculation on AMD
       [not found] <>
@ 2020-01-02 22:07 ` Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2020-01-02 22:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jan H .  Schönherr,
	Borislav Petkov, Tony Luck, H. Peter Anvin, Ingo Molnar,
	linux-edac, Thomas Gleixner, x86-ml, Yazen Ghannam, Sasha Levin

From: Jan H. Schönherr <>

[ Upstream commit a3a57ddad061acc90bef39635caf2b2330ce8f21 ]

The function mce_severity_amd_smca() requires m->bank to be initialized
for correct operation. Fix the one case, where mce_severity() is called
without doing so.

Fixes: 6bda529ec42e ("x86/mce: Grade uncorrected errors for SMCA-enabled systems")
Fixes: d28af26faa0b ("x86/MCE: Initialize in the case of a fatal error in mce_no_way_out()")
Signed-off-by: Jan H. Schönherr <>
Signed-off-by: Borislav Petkov <>
Reviewed-by: Tony Luck <>
Cc: "H. Peter Anvin" <>
Cc: Ingo Molnar <>
Cc: linux-edac <>
Cc: <>
Cc: Thomas Gleixner <>
Cc: x86-ml <>
Cc: Yazen Ghannam <>
Signed-off-by: Sasha Levin <>
 arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 87ed8462a5c7..1f69b12d5bb8 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -812,8 +812,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
 		if (quirk_no_way_out)
 			quirk_no_way_out(i, m, regs);
+		m->bank = i;
 		if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
-			m->bank = i;
 			mce_read_aux(m, i);
 			*msg = tmp;
 			return 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2020-01-02 22:07 ` [PATCH 4.19 074/114] x86/mce: Fix possibly incorrect severity calculation on AMD Greg Kroah-Hartman

Linux-EDAC Archive on

Archives are clonable:
	git clone --mirror linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ \
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone