The patch titled Subject: parport_pc: release IO region properly if unsupported ITE887x card is found has been added to the -mm tree. Its filename is parport_pc-release-io-region-properly-if-unsupported-ite887x-card-is-found.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ From: Jiri Kosina <jkosina@xxxxxxx> Subject: parport_pc: release IO region properly if unsupported ITE887x card is found sio_ite_8872_probe() bails out if it detects no-parallel (1S, 2S) or unknown card. It doesn't call release_region() on the previously allocated resource though. This causes (a) leak of the resource (b) kernel oops when parport module is removed and /proc/ioports is read. This is because the string that has been associated to the IO port region is a static char array inside the already removed module. Let's call release_region() properly before baling out. Signed-off-by: Jiri Kosina <jkosina@xxxxxxx> Acked-by: Niels de Vos <ndevos@xxxxxxxxxx> Cc: Bjorn Helgaas <bjorn.helgaas@xxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx> Cc: Joe Krahn <krahn@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxx> --- drivers/parport/parport_pc.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN drivers/parport/parport_pc.c~parport_pc-release-io-region-properly-if-unsupported-ite887x-card-is-found drivers/parport/parport_pc.c --- a/drivers/parport/parport_pc.c~parport_pc-release-io-region-properly-if-unsupported-ite887x-card-is-found +++ a/drivers/parport/parport_pc.c @@ -2595,14 +2595,17 @@ static int __devinit sio_ite_8872_probe( break; case 0x6: printk(KERN_INFO "parport_pc: ITE8873 found (1S)\n"); + release_region(inta_addr[i], 32); return 0; case 0x8: printk(KERN_INFO "parport_pc: ITE8874 found (2S)\n"); + release_region(inta_addr[i], 32); return 0; default: printk(KERN_INFO "parport_pc: unknown ITE887x\n"); printk(KERN_INFO "parport_pc: please mail 'lspci -nvv' " "output to Rich.Liu@xxxxxxxxxx\n"); + release_region(inta_addr[i], 32); return 0; } _ Subject: Subject: parport_pc: release IO region properly if unsupported ITE887x card is found Patches currently in -mm which might be from jkosina@xxxxxxx are origin.patch linux-next.patch binfmt_elf-fix-pie-execution-with-randomization-disabled.patch parport_pc-release-io-region-properly-if-unsupported-ite887x-card-is-found.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