[patch 23/45] ioremap balanced with iounmap for drivers/scsi/amiga7xx.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Amol Lad <amol@xxxxxxxxxxxxxxxxxxx>

ioremap must be balanced by an iounmap and failing to do so can result in a
memory leak.

Signed-off-by: Amol Lad <amol@xxxxxxxxxxxxxxxxxxx>
Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/scsi/amiga7xx.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/scsi/amiga7xx.c~ioremap-balanced-with-iounmap-drivers-scsi-amiga7xxc drivers/scsi/amiga7xx.c
--- a/drivers/scsi/amiga7xx.c~ioremap-balanced-with-iounmap-drivers-scsi-amiga7xxc
+++ a/drivers/scsi/amiga7xx.c
@@ -115,6 +115,8 @@ static int amiga7xx_release(struct Scsi_
 		free_irq(shost->irq, NULL);
 	if (shost->dma_channel != 0xff)
 		free_dma(shost->dma_channel);
+	if (shost->base)
+		z_iounmap((void *)shost->base);
 	if (shost->io_port && shost->n_io_port)
 		release_region(shost->io_port, shost->n_io_port);
 	scsi_unregister(shost);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux