cxl: Test the correct mmio space before unmapping
PATCH 1/1 cxl: Test the correct mmio space before unmapping
Before freeing p2n, test p2n, not p1n.
---
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(-)
drivers/misc/cxl/pci.c +1 -1
@@ -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);
Signature · 1 line
2.1.4
Quoted 3 lines · Daniel Axtens
Before freeing p2n, test p2n, not p1n.
=20Signed-off-by Daniel Axtens <[email protected]>
Nice catch but can you resend with a CC stable?
Mikey
Quoted 22 lines
=20
---
=20
While a potentially nasty bug, this is only hit (at the moment) incxl_remove, so it's probably not a candidate for stable.--- drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)=20
drivers/misc/cxl/pci.c +0
-0@@ -540,7 +540,7 @@ err:=20
static voidcxl_unmap_slice_regs(struct cxl_afu *afu){drivers/misc/cxl/pci.c +1
-1-if (afu->p1n_mmio) +if (afu->p2n_mmio)iounmap (afu->p2n_mmio);if (afu->p1n_mmio)iounmap (afu->p1n_mmio);
Quoted 6 lines · Michael Neuling
Quoted 3 lines · Daniel Axtens
Before freeing p2n, test p2n, not p1n.
=20Signed-off-by Daniel Axtens <[email protected]>=20
Nice catch but can you resend with a CC stable?
Actually stable is overkill, but this is a bug should to go in 4.2 as a bug fix.
Mikey
Quoted 26 lines
=20
Mikey
=20Quoted 17 lines
=20
---
=20
While a potentially nasty bug, this is only hit (at the moment) incxl_remove, so it's probably not a candidate for stable.--- drivers/misc/cxl/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)=20
drivers/misc/cxl/pci.c +0
-0@@ -540,7 +540,7 @@ err:=20
static voidcxl_unmap_slice_regs(struct cxl_afu *afu){drivers/misc/cxl/pci.c err: · line 546
Quoted 5 lines
drivers/misc/cxl/pci.c +1
-1-if (afu->p1n_mmio) +if (afu->p2n_mmio)iounmap (afu->p2n_mmio);if (afu->p1n_mmio)iounmap (afu->p1n_mmio);=20
Michael Ellerman
AppliedQuoted 4 lines · Daniel Axtens
Before freeing p2n, test p2n, not p1n.
Signed-off-by Daniel Axtens <[email protected]>Acked-by Ian Munsie <[email protected]>
Applied to powerpc fixes, thanks.
cheers