summaryrefslogtreecommitdiffstats
path: root/drivers/ras
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2020-02-14 14:27:17 -0800
committerBorislav Petkov <bp@suse.de>2020-04-14 15:59:26 +0200
commit23ba710a0864108910c7531dc4c73ef65eca5568 (patch)
treed5875a88dffb875229136fed490ad8367a108fdc /drivers/ras
parent1de08dccd383482a3e88845d3554094d338f5ff9 (diff)
downloadlinux-23ba710a0864108910c7531dc4c73ef65eca5568.tar.bz2
x86/mce: Fix all mce notifiers to update the mce->kflags bitmask
If the handler took any action to log or deal with the error, set a bit in mce->kflags so that the default handler on the end of the machine check chain can see what has been done. Get rid of NOTIFY_STOP returns. Make the EDAC and dev-mcelog handlers skip over errors already processed by CEC. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Tested-by: Tony Luck <tony.luck@intel.com> Link: https://lkml.kernel.org/r/20200214222720.13168-5-tony.luck@intel.com
Diffstat (limited to 'drivers/ras')
-rw-r--r--drivers/ras/cec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 6b42040bf956..569d9ad2c594 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -538,9 +538,12 @@ static int cec_notifier(struct notifier_block *nb, unsigned long val,
/* We eat only correctable DRAM errors with usable addresses. */
if (mce_is_memory_error(m) &&
mce_is_correctable(m) &&
- mce_usable_address(m))
- if (!cec_add_elem(m->addr >> PAGE_SHIFT))
- return NOTIFY_STOP;
+ mce_usable_address(m)) {
+ if (!cec_add_elem(m->addr >> PAGE_SHIFT)) {
+ m->kflags |= MCE_HANDLED_CEC;
+ return NOTIFY_OK;
+ }
+ }
return NOTIFY_DONE;
}