From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, "Jan H . Schönherr" <jschoenh@amazon.de>,
"Borislav Petkov" <bp@suse.de>, "Tony Luck" <tony.luck@intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"Ingo Molnar" <mingo@kernel.org>,
linux-edac <linux-edac@vger.kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>, x86-ml <x86@kernel.org>,
"Yazen Ghannam" <Yazen.Ghannam@amd.com>
Subject: [PATCH 5.4 423/434] x86/mce: Fix possibly incorrect severity calculation on AMD
Date: Sun, 29 Dec 2019 18:27:56 +0100 [thread overview]
Message-ID: <20191229172731.249449127@linuxfoundation.org> (raw)
In-Reply-To: <20191229172702.393141737@linuxfoundation.org>
From: Jan H. Schönherr <jschoenh@amazon.de>
commit a3a57ddad061acc90bef39635caf2b2330ce8f21 upstream.
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 mce.bank in the case of a fatal error in mce_no_way_out()")
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
Link: https://lkml.kernel.org/r/20191210000733.17979-4-jschoenh@amazon.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/cpu/mce/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -814,8 +814,8 @@ static int mce_no_way_out(struct mce *m,
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;
prev parent reply other threads:[~2019-12-29 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191229172702.393141737@linuxfoundation.org>
2019-12-29 17:23 ` [PATCH 5.4 157/434] x86/mce: Lower throttling MCE messages priority to warning Greg Kroah-Hartman
2019-12-29 17:24 ` [PATCH 5.4 187/434] EDAC/amd64: Set grain per DIMM Greg Kroah-Hartman
2019-12-29 17:25 ` [PATCH 5.4 284/434] EDAC/ghes: Fix grain calculation Greg Kroah-Hartman
2019-12-29 17:27 ` [PATCH 5.4 421/434] x86/MCE/AMD: Do not use rdmsr_safe_on_cpu() in smca_configure() Greg Kroah-Hartman
2019-12-29 17:27 ` [PATCH 5.4 422/434] x86/MCE/AMD: Allow Reserved types to be overwritten in smca_banks[] Greg Kroah-Hartman
2019-12-29 17:27 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191229172731.249449127@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=Yazen.Ghannam@amd.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=jschoenh@amazon.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).