All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] floppy driver oopses on forced unload (against 2.5.65)
@ 2003-03-19 22:11 Angus Sawyer
  0 siblings, 0 replies; only message in thread
From: Angus Sawyer @ 2003-03-19 22:11 UTC (permalink / raw)
  To: linux-kernel


Prevent OOPS on removing floppy driver with "rmmod -f floppy".

floppy.c would attempt to unregister resources for nonexistent device.  

Patch stops the driver attempting to register and unregister the nonexistent 
device by removing the drive from the allowed drives mask (defaults to 
present). 



 drivers/block/floppy.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN drivers/block/floppy.c~floppy-unload-fix drivers/block/floppy.c
--- linux-2.5.65/drivers/block/floppy.c~floppy-unload-fix	Wed Mar 19 18:44:15 
2003
+++ linux-2.5.65-/drivers/block/floppy.c	Wed Mar 19 21:33:22 2003
@@ -3649,6 +3649,8 @@ static void __init config_types(void)
 				name = default_drive_params[type].name;
 				allowed_drive_mask |= 1 << drive;
 			}
+			else
+				allowed_drive_mask &= ~(1 << drive);
 		} else {
 			params = &default_drive_params[0].params;
 			sprintf(temparea, "unknown type %d (usb?)", type);

_


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-19 22:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-19 22:11 [PATCH] floppy driver oopses on forced unload (against 2.5.65) Angus Sawyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.