From: Vishal Verma <vishal.l.verma@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Luck, Tony" <tony.luck@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86/MCE: Export memory_error()
Date: Tue, 25 Apr 2017 15:07:41 -0600 [thread overview]
Message-ID: <20170425210740.GA15722@omniknight.lm.intel.com> (raw)
In-Reply-To: <20170424113620.6iq2466yhkhb33rp@pd.tnic>
On 04/24, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> Date: Mon, 24 Apr 2017 13:16:50 +0200
> Subject: [PATCH 1/2] x86/MCE: Export memory_error()
>
> Export the function which checks whether an MCE is a memory error to
> other users so that we can reuse the logic. Drop the boot_cpu_data use,
> while at it, as mce.cpuvendor already has the CPU vendor in there.
>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> arch/x86/include/asm/mce.h | 1 +
> arch/x86/kernel/cpu/mcheck/mce.c | 12 +++++-------
> 2 files changed, 6 insertions(+), 7 deletions(-)
>
Here is the updated patch to use the above helper:
8<-----
>From 9661a85799c9067d762ecf29630f2b7f69897628 Mon Sep 17 00:00:00 2001
From: Vishal Verma <vishal.l.verma@intel.com>
Date: Tue, 25 Apr 2017 15:00:58 -0600
Subject: [PATCH v2] acpi, nfit: fix the memory error check in nfit_handle_mce
The check for an MCE being a memory error in the NFIT mce handler was
bogus. Export the new mce_is_memory_error helper, and use that tp
perform the correct check in the handler.
Reported-by: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
arch/x86/kernel/cpu/mcheck/mce.c | 1 +
drivers/acpi/nfit/mce.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
This applies on tip/master + Borislav's patches in this thread above.
I'm not sure what the right process for queueing this for both
upstream and -stable is, so just replying here. Should I post it
independently?
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 361865ca..5cfbaeb 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -527,6 +527,7 @@ bool mce_is_memory_error(struct mce *m)
return false;
}
+EXPORT_SYMBOL_GPL(mce_is_memory_error);
static bool cec_add_mce(struct mce *m)
{
diff --git a/drivers/acpi/nfit/mce.c b/drivers/acpi/nfit/mce.c
index 3ba1c34..fd86bec 100644
--- a/drivers/acpi/nfit/mce.c
+++ b/drivers/acpi/nfit/mce.c
@@ -26,7 +26,7 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
struct nfit_spa *nfit_spa;
/* We only care about memory errors */
- if (!(mce->status & MCACOD))
+ if (!mce_is_memory_error(mce))
return NOTIFY_DONE;
/*
--
2.9.3
next prev parent reply other threads:[~2017-04-25 21:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 22:18 [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce Vishal Verma
2017-04-20 22:21 ` Verma, Vishal L
2017-04-21 2:21 ` kbuild test robot
2017-04-21 19:21 ` Dan Williams
2017-04-21 19:56 ` Verma, Vishal L
2017-04-21 20:16 ` Luck, Tony
2017-04-21 20:19 ` Dan Williams
2017-04-21 20:27 ` Luck, Tony
2017-04-21 21:07 ` Borislav Petkov
2017-04-24 11:36 ` [PATCH 1/2] x86/MCE: Export memory_error() Borislav Petkov
2017-04-25 21:07 ` Vishal Verma [this message]
2017-05-10 19:31 ` Verma, Vishal L
2017-05-10 20:04 ` Borislav Petkov
2017-05-10 20:06 ` Verma, Vishal L
2017-05-10 20:08 ` Borislav Petkov
2017-05-10 21:12 ` Verma, Vishal L
2017-05-10 21:57 ` Borislav Petkov
2017-05-10 22:03 ` Verma, Vishal L
2017-05-10 22:16 ` Borislav Petkov
2017-05-10 22:22 ` Verma, Vishal L
2017-05-17 12:38 ` Borislav Petkov
2017-05-17 18:58 ` Verma, Vishal L
2017-05-17 19:20 ` Borislav Petkov
2017-04-24 11:37 ` [PATCH 2/2] x86/ras/mce_amd_inj: Preset MCE injection struct Borislav Petkov
2017-04-26 19:59 ` kbuild test robot
2017-04-21 20:35 ` [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce Vishal Verma
2017-04-21 20:50 ` Luck, Tony
2017-04-21 20:54 ` Vishal Verma
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=20170425210740.GA15722@omniknight.lm.intel.com \
--to=vishal.l.verma@intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=stable@vger.kernel.org \
--cc=tony.luck@intel.com \
/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).