Messages in this thread | | | Date | Sun, 6 Aug 2000 20:10:07 +0100 (BST) | From | Tigran Aivazian <> | Subject | Re: bug in blkdev <-> VFS interaction. (oops) |
| |
I do realize that there are two sb's we are talking about here - the read_super() is for sb for filesystem being mounted and has nothing to do with the fake_inode->i_sb which should contain the sb of the filesystem that contains the device node. So my reference to read_super() in get_sb_bdev() is irrelevant but nevertheless the problem is real and still needs thought and fixing.
On Sun, 6 Aug 2000, Tigran Aivazian wrote:
> Hi Alexander, > > I have just found an interesting bug. Try mounting read/write a > write-protected floppy in 2.4.0-test6-pre5 (probably also other > kernels). The oops is attached. > > The reason is quite clear. When blkdev_get() calls block device open > routine it passes a fake_inode as 'inode' argument and therefore it's > inode->i_sb is not set because it is not known yet (sb=read_super() > happens later than blkdev_get() in get_sb_bdev()). Now, the device open > routine, for example drivers/block/floppy.c:floppy_open() is free to call > permission(inode, mask) on that inode which will in turn do > IS_RDONLY(inode) which dereferences inode->i_sb->s_flags off NULL > inode->i_sb - hence the oops. > > So, it looks like to get a bdev we need to blkdev_get it which needs a > superblock but to get a superblock we need a bdev. What do we do? > > Regards, > Tigran >
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |