Skip to contentSkip to conversation

acpi/nfit: fix badrange insertion in nfit_handle_mce()

PATCH New Zhen Lei 1 participant 2 messages Nov 19, 2020

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

v2 cover acpi/nfit: fix badrange insertion in nfit_handle_mce()

v1 --> v2:
Modified the title and description of the patch.

Zhen Lei (1):
acpi/nfit: fix badrange insertion in nfit_handle_mce()

 drivers/acpi/nfit/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.26.0.106.g9fadedd
author
#1 lore raw

PATCH v2 1/1 acpi/nfit: fix badrange insertion in nfit_handle_mce()

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")
---
 drivers/acpi/nfit/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/nfit/mce.c +1 -1
index ee8d9973f60b..053e719c7bea 100644
@@ -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);
Signature · 1 line
2.26.0.106.g9fadedd