Re: 2.4.11-pre1 oops in bdget() -- FIXED

From: Mikael Pettersson (mikpe@csd.uu.se)
Date: Mon Oct 01 2001 - 12:28:56 EST


On Mon, 1 Oct 2001 08:35:03 -0700 (PDT), Linus Torvalds wrote:
>
>The thing we oops on is the _old_ blksize_size[] array information for the
>floppy, which was loaded as a module and then unloaded - it's ugly that it
>doesn't clean up its copy of the blksize_size array, but the real cause
>for the problem is that bdget() references it before it has opened the
>device.
>
>The (untested) fix is to just remove the line in bdget() that sets
>i_blkbits, as the thing is later set correctly in blkdev_get().

Confirmed. With the patch below I can no longer trigger the oops.

/Mikael

--- linux-2.4.11-pre1/fs/block_dev.c.~1~ Mon Oct 1 11:48:54 2001
+++ linux-2.4.11-pre1/fs/block_dev.c Mon Oct 1 18:59:16 2001
@@ -345,7 +345,6 @@ struct block_device *bdget(dev_t dev)
                         inode->i_rdev = kdev;
                         inode->i_dev = kdev;
                         inode->i_bdev = new_bdev;
- inode->i_blkbits = blksize_bits(block_size(kdev));
                         inode->i_data.a_ops = &def_blk_aops;
                         inode->i_data.gfp_mask = GFP_USER;
                         spin_lock(&bdev_lock);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:15 EST