Re: Linux 2.6.37-rc1 (floppy module load: no device found)

From: Linus Torvalds
Date: Fri Nov 05 2010 - 19:39:19 EST


On Fri, Nov 5, 2010 at 4:03 PM, Randy Dunlap <randy.dunlap@xxxxxxxxxx> wrote:
> On 11/05/10 15:10, Linus Torvalds wrote:
>>
>> Randy, is this one also related to that ipv6 percpu list corruption?
>> IOW, does it go away with
>>
>>   http://patchwork.ozlabs.org/patch/69939/
>>
>> like one of your other reports did?
>
> The list_debug.c message goes away, but it still gets the GP fault.

Ok. I think there's a separate floppy.c bug introduced in commit
488211844e0c ("floppy: switch to one queue per drive instead of
sharing a queue").

We do "put_disk()" on the disk device _before_ we then clean up the
queue associated with that disk.

So maybe this trivial patch is in order?

Again - UNTESTED. Jens, Vivek?

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

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 767107c..8f19b38 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4363,9 +4363,9 @@ out_unreg_blkdev:
out_put_disk:
while (dr--) {
del_timer(&motor_off_timer[dr]);
- put_disk(disks[dr]);
if (disks[dr]->queue)
blk_cleanup_queue(disks[dr]->queue);
+ put_disk(disks[dr]);
}
return err;
}