From patchwork Thu Apr 20 22:18:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 9691451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F89060383 for ; Thu, 20 Apr 2017 22:20:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3277226CFC for ; Thu, 20 Apr 2017 22:20:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 272D528487; Thu, 20 Apr 2017 22:20:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29D1A26CFC for ; Thu, 20 Apr 2017 22:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032048AbdDTWUF (ORCPT ); Thu, 20 Apr 2017 18:20:05 -0400 Received: from mga04.intel.com ([192.55.52.120]:37490 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031997AbdDTWUF (ORCPT ); Thu, 20 Apr 2017 18:20:05 -0400 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 15:19:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,227,1488873600"; d="scan'208";a="79342914" Received: from omniknight.lm.intel.com ([10.232.112.53]) by orsmga004.jf.intel.com with ESMTP; 20 Apr 2017 15:19:53 -0700 From: Vishal Verma To: Cc: , Tony Luck , Vishal Verma , stable@vger.kernel.org Subject: [PATCH] acpi, nfit: fix the memory error check in nfit_handle_mce Date: Thu, 20 Apr 2017 16:18:18 -0600 Message-Id: <20170420221818.23522-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.9.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The check for an MCE being a memory error in the NFIT mce handler was bogus. Fix it to check for the correct MCA status compound error code. Reported-by: Tony Luck Cc: Signed-off-by: Vishal Verma --- 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..23e12a0 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->status & 0xef80) == BIT(7)) return NOTIFY_DONE; /*