I found out the oops happens at ext2_read_inode() called by
ext2_read_super() to read inode for the root. ext2_read_inode() need to
access inode->i_sb->u.ext2_sb.s_es, but suprisingly, this s_es is NULL!
I further found that this is because inode->i_sb does NOT points to the
supper block whose content is filled by ext2_read_super(), instead it
points to other unknown memory. Printing out inode->s_sb in
ext2_read_inode() and priniting out sb before ext2_read_super() executes
sb->s_root = d_alloc_root(iget(sb, EXT2_ROOT_INO)) can easily reveal this
problem.
I also wrote a very simple file system, only implementing read_super and
read_inode. When it's compiled as a module, the same problem exists. But
when it's compiled into the kernel, no problem at all!
Is it a bug or am I missing something? BTW, the kernel is 2.4.19 and gcc
is 3.2
Ronghua
-
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/