lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090206085501.GA18125@frolo.macqel>
Date:	Fri, 6 Feb 2009 09:55:01 +0100
From:	Philippe De Muyter <phdm@...qel.be>
To:	Bjorn Helgaas <bjorn.helgaas@...com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, hancockrwd@...il.com, abelay@....edu,
	lenb@...nel.org, stable@...nel.org
Subject: [PATCH] floppy: release only the ports we actually requested

Bjorn, Andrew,

--

With the last floppy patch, the floppy driver requests only the ports that
it really uses, but the code contains yet places where it releases those
unrequested ports.  I don't know if it is harmfull, but I think it is cleaner
that the parameters of the release_region calls match the request_region ones.

Signed-off-by: Philippe De Muyter <phdm@...qel.be>

--- a/drivers/block/floppy.c	2009-02-06 08:56:33.000000000 +0100
+++ b/drivers/block/floppy.c	2009-02-06 09:05:55.000000000 +0100
@@ -4274,7 +4274,8 @@ static int __init floppy_init(void)
 		FDCS->rawcmd = 2;
 		if (user_reset_fdc(-1, FD_RESET_ALWAYS, 0)) {
 			/* free ioports reserved by floppy_grab_irq_and_dma() */
-			release_region(FDCS->address + 2, 4);
+			release_region(FDCS->address + 2, 1);
+			release_region(FDCS->address + 4, 2);
 			release_region(FDCS->address + 7, 1);
 			FDCS->address = -1;
 			FDCS->version = FDC_NONE;
@@ -4284,7 +4285,8 @@ static int __init floppy_init(void)
 		FDCS->version = get_fdc_version();
 		if (FDCS->version == FDC_NONE) {
 			/* free ioports reserved by floppy_grab_irq_and_dma() */
-			release_region(FDCS->address + 2, 4);
+			release_region(FDCS->address + 2, 1);
+			release_region(FDCS->address + 4, 2);
 			release_region(FDCS->address + 7, 1);
 			FDCS->address = -1;
 			continue;
@@ -4510,7 +4512,8 @@ static void floppy_release_irq_and_dma(v
 	old_fdc = fdc;
 	for (fdc = 0; fdc < N_FDC; fdc++)
 		if (FDCS->address != -1) {
-			release_region(FDCS->address + 2, 4);
+			release_region(FDCS->address + 2, 1);
+			release_region(FDCS->address + 4, 2);
 			release_region(FDCS->address + 7, 1);
 		}
 	fdc = old_fdc;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ