linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxl: Test the correct mmio space before unmapping
@ 2015-07-02  5:55 Daniel Axtens
  2015-07-02  5:58 ` Ian Munsie
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Daniel Axtens @ 2015-07-02  5:55 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: mpe, benh, mikey, imunsie, Daniel Axtens

Before freeing p2n, test p2n, not p1n.

Signed-off-by: Daniel Axtens <dja@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-07 10:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02  5:55 [PATCH] cxl: Test the correct mmio space before unmapping Daniel Axtens
2015-07-02  5:58 ` Ian Munsie
2015-07-03  0:23 ` Michael Neuling
2015-07-03  0:27   ` Michael Neuling
2015-07-07 10:38 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).