diff mbox series

[v2,1/1] acpi/nfit: fix badrange insertion in nfit_handle_mce()

Message ID 20201119015746.1990-2-thunder.leizhen@huawei.com (mailing list archive)
State New, archived
Headers show
Series acpi/nfit: fix badrange insertion in nfit_handle_mce() | expand

Commit Message

Leizhen (ThunderTown) Nov. 19, 2020, 1:57 a.m. UTC
Make sure the badrange to be reported can always cover mce->addr.

Fixes: 9ffd6350a103 ("nfit: don't start a full scrub by default for an MCE")
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
---
 drivers/acpi/nfit/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/acpi/nfit/mce.c b/drivers/acpi/nfit/mce.c
index ee8d9973f60b..053e719c7bea 100644
--- a/drivers/acpi/nfit/mce.c
+++ b/drivers/acpi/nfit/mce.c
@@ -63,7 +63,7 @@  static int nfit_handle_mce(struct notifier_block *nb, unsigned long val,
 
 		/* If this fails due to an -ENOMEM, there is little we can do */
 		nvdimm_bus_add_badrange(acpi_desc->nvdimm_bus,
-				ALIGN(mce->addr, L1_CACHE_BYTES),
+				ALIGN_DOWN(mce->addr, L1_CACHE_BYTES),
 				L1_CACHE_BYTES);
 		nvdimm_region_notify(nfit_spa->nd_region,
 				NVDIMM_REVALIDATE_POISON);