- ioremap-balanced-with-iounmap-for-drivers-serial-mpsc.patch removed from -mm tree

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

 



The patch titled

     ioremap balanced with iounmap for drivers/serial/mpsc.c

has been removed from the -mm tree.  Its filename is

     ioremap-balanced-with-iounmap-for-drivers-serial-mpsc.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: ioremap balanced with iounmap for drivers/serial/mpsc.c
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: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Cc: Mark A. Greer <mgreer@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/serial/mpsc.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff -puN drivers/serial/mpsc.c~ioremap-balanced-with-iounmap-for-drivers-serial-mpsc drivers/serial/mpsc.c
--- a/drivers/serial/mpsc.c~ioremap-balanced-with-iounmap-for-drivers-serial-mpsc
+++ a/drivers/serial/mpsc.c
@@ -1893,6 +1893,10 @@ mpsc_drv_map_regs(struct mpsc_port_info 
 	}
 	else {
 		mpsc_resource_err("SDMA base");
+		if (pi->mpsc_base) {
+			iounmap(pi->mpsc_base);
+			pi->mpsc_base = NULL;
+		}
 		return -ENOMEM;
 	}
 
@@ -1905,6 +1909,14 @@ mpsc_drv_map_regs(struct mpsc_port_info 
 	}
 	else {
 		mpsc_resource_err("BRG base");
+		if (pi->mpsc_base) {
+			iounmap(pi->mpsc_base);
+			pi->mpsc_base = NULL;
+		}
+		if (pi->sdma_base) {
+			iounmap(pi->sdma_base);
+			pi->sdma_base = NULL;
+		}
 		return -ENOMEM;
 	}
 
_

Patches currently in -mm which might be from amol@xxxxxxxxxxxxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux