summaryrefslogtreecommitdiffstats
path: root/drivers/edac/pnd2_edac.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2020-07-07 12:43:24 -0700
committerBorislav Petkov <bp@suse.de>2020-08-18 15:40:30 +0200
commit45bc6098a3e279d8e391d22428396687562797e2 (patch)
tree4d790540ea254bed87afa7a84c3de23ae4b0bf4d /drivers/edac/pnd2_edac.c
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff)
downloadlinux-45bc6098a3e279d8e391d22428396687562797e2.tar.gz
linux-45bc6098a3e279d8e391d22428396687562797e2.tar.bz2
linux-45bc6098a3e279d8e391d22428396687562797e2.zip
EDAC/{i7core,sb,pnd2,skx}: Fix error event severity
IA32_MCG_STATUS.RIPV indicates whether the return RIP value pushed onto the stack as part of machine check delivery is valid or not. Various drivers copied a code fragment that uses the RIPV bit to determine the severity of the error as either HW_EVENT_ERR_UNCORRECTED or HW_EVENT_ERR_FATAL, but this check is reversed (marking errors where RIPV is set as "FATAL"). Reverse the tests so that the error is marked fatal when RIPV is not set. Reported-by: Gabriele Paoloni <gabriele.paoloni@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: <stable@vger.kernel.org> Link: https://lkml.kernel.org/r/20200707194324.14884-1-tony.luck@intel.com
Diffstat (limited to 'drivers/edac/pnd2_edac.c')
-rw-r--r--drivers/edac/pnd2_edac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index fd363746f5b0..b8fc4b84fd86 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -1155,7 +1155,7 @@ static void pnd2_mce_output_error(struct mem_ctl_info *mci, const struct mce *m,
u32 optypenum = GET_BITFIELD(m->status, 4, 6);
int rc;
- tp_event = uc_err ? (ripv ? HW_EVENT_ERR_FATAL : HW_EVENT_ERR_UNCORRECTED) :
+ tp_event = uc_err ? (ripv ? HW_EVENT_ERR_UNCORRECTED : HW_EVENT_ERR_FATAL) :
HW_EVENT_ERR_CORRECTED;
/*