Commit 76c25284 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix floppy oops on forced unload

From: Angus Sawyer <angus.sawyer@dsl.pipex.com>

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).
parent 0fa1419b
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment