From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from terminus.zytor.com ([65.50.211.136]:52845 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbdEUTov (ORCPT ); Sun, 21 May 2017 15:44:51 -0400 Date: Sun, 21 May 2017 12:43:43 -0700 From: tip-bot for Vishal Verma Message-ID: Cc: hpa@zytor.com, stable@vger.kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org, vishal.l.verma@intel.com, tony.luck@intel.com, tglx@linutronix.de, bp@suse.de Reply-To: mingo@kernel.org, hpa@zytor.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org, vishal.l.verma@intel.com, tony.luck@intel.com, bp@suse.de, tglx@linutronix.de In-Reply-To: <20170519093915.15413-3-bp@alien8.de> References: <20170519093915.15413-3-bp@alien8.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:ras/urgent] acpi, nfit: Fix the memory error check in nfit_handle_mce() MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: stable-owner@vger.kernel.org List-ID: Commit-ID: fc08a4703a418a398bbb575ac311d36d110ac786 Gitweb: http://git.kernel.org/tip/fc08a4703a418a398bbb575ac311d36d110ac786 Author: Vishal Verma AuthorDate: Fri, 19 May 2017 11:39:10 +0200 Committer: Thomas Gleixner CommitDate: Sun, 21 May 2017 21:39:59 +0200 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. Use the new mce_is_memory_error() helper to detect the error properly. Reported-by: Tony Luck Signed-off-by: Vishal Verma Signed-off-by: Borislav Petkov Cc: Link: http://lkml.kernel.org/r/20170519093915.15413-3-bp@alien8.de Signed-off-by: Thomas Gleixner --- drivers/acpi/nfit/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; /*