[PATCH] cxl: Test the correct mmio space before unmapping

Daniel Axtens dja at axtens.net
Thu Jul 2 15:55:21 AEST 2015


Before freeing p2n, test p2n, not p1n.

Signed-off-by: Daniel Axtens <dja at axtens.net>

---

While a potentially nasty bug, this is only hit (at the moment)
in cxl_remove, so it's probably not a candidate for stable.
---
 drivers/misc/cxl/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index a16988d..fd43462 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -540,7 +540,7 @@ err:
 
 static void cxl_unmap_slice_regs(struct cxl_afu *afu)
 {
-	if (afu->p1n_mmio)
+	if (afu->p2n_mmio)
 		iounmap(afu->p2n_mmio);
 	if (afu->p1n_mmio)
 		iounmap(afu->p1n_mmio);
-- 
2.1.4



More information about the Linuxppc-dev mailing list