The patch titled ioremap balanced with iounmap for drivers/serial/ip22zilog.c has been added to the -mm tree. Its filename is ioremap-balanced-with-iounmap-for-drivers-serial-ip22zilog.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ioremap balanced with iounmap for drivers/serial/ip22zilog.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> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/serial/ip22zilog.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff -puN drivers/serial/ip22zilog.c~ioremap-balanced-with-iounmap-for-drivers-serial-ip22zilog drivers/serial/ip22zilog.c --- a/drivers/serial/ip22zilog.c~ioremap-balanced-with-iounmap-for-drivers-serial-ip22zilog +++ a/drivers/serial/ip22zilog.c @@ -1229,13 +1229,27 @@ static int __init ip22zilog_init(void) static void __exit ip22zilog_exit(void) { int i; + struct uart_ip22zilog_port *up; for (i = 0; i < NUM_CHANNELS; i++) { - struct uart_ip22zilog_port *up = &ip22zilog_port_table[i]; + up = &ip22zilog_port_table[i]; uart_remove_one_port(&ip22zilog_reg, &up->port); } + /* Free IO mem */ + up = &ip22zilog_port_table[0]; + for (i = 0; i < NUM_IP22ZILOG; i++) { + if (up[(i * 2) + 0].port.mapbase) { + iounmap((void*)up[(i * 2) + 0].port.mapbase); + up[(i * 2) + 0].port.mapbase = 0; + } + if (up[(i * 2) + 1].port.mapbase) { + iounmap((void*)up[(i * 2) + 1].port.mapbase); + up[(i * 2) + 1].port.mapbase = 0; + } + } + uart_unregister_driver(&ip22zilog_reg); } _ Patches currently in -mm which might be from amol@xxxxxxxxxxxxxxxxxxx are origin.patch ioremap-balanced-with-iounmap-for-drivers-serial-8250_acorn.patch ioremap-balanced-with-iounmap-for-drivers-serial-8250_gsc.patch ioremap-balanced-with-iounmap-for-drivers-serial-ioc4_serial.patch ioremap-balanced-with-iounmap-for-drivers-serial-ip22zilog.patch ioremap-balanced-with-iounmap-for-drivers-serial-mpc52xx_uart.patch ioremap-balanced-with-iounmap-for-drivers-serial-mpsc.patch ioremap-balanced-with-iounmap-for-drivers-serial-mux.patch ioremap-balanced-with-iounmap-for-drivers-serial-sunsu.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