Merge tag 'fuse-fixes-4.20-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / acpi / nfit / mce.c
index e9626bf6ca2960a2398aeeefc0f4c9e814e60c1b..d6c1b10f6c2542a8cfbbac6dae31246cd35134f7 100644 (file)
@@ -25,8 +25,12 @@ static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
        struct acpi_nfit_desc *acpi_desc;
        struct nfit_spa *nfit_spa;
 
-       /* We only care about memory errors */
-       if (!mce_is_memory_error(mce))
+       /* We only care about uncorrectable memory errors */
+       if (!mce_is_memory_error(mce) || mce_is_correctable(mce))
+               return NOTIFY_DONE;
+
+       /* Verify the address reported in the MCE is valid. */
+       if (!mce_usable_address(mce))
                return NOTIFY_DONE;
 
        /*