Skip to contentSkip to conversation

bug in get_name of export operations?

DISCUSSION Vladimir V. Saveliev 2 participants 3 messages Dec 19, 2005 – Dec 20, 2005

lore
Share & tools
lore
#0 lore raw

Hello

Please point my error if I am wrong:

fs/exportfs/expfs.c:get_name() opens a directory with:
file = dentry_open(dget(dentry), NULL, O_RDONLY); which results in file where file->f_vfsmnt == NULL.

Then fs/readdir.c:vfs_readdir() and, therefore, include/linux/fs.h:file_accessed(file) are called. file_accessed() calls fs/inode.c:touch_atime() which tryies to dereference mnt which is NULL.

#1 lore raw
Quoted 5 lines · Vladimir V. Saveliev

Hello

Please point my error if I am wrong:

Quoted 9 lines

fs/exportfs/expfs.c:get_name() opens a directory with:
file = dentry_open(dget(dentry), NULL, O_RDONLY); which results in file where file->f_vfsmnt == NULL.

Then fs/readdir.c:vfs_readdir() and, therefore, include/linux/fs.h:file_accessed(file) are called. file_accessed() calls fs/inode.c:touch_atime() which tryies to dereference mnt which is NULL.

I think you're looking at the -mm tree, in which Christoph changed all that stuff.

#2 lore raw

Hello

Quoted 9 lines · Andrew Morton
Quoted 8 lines · Vladimir V. Saveliev

Hello

Please point my error if I am wrong:

fs/exportfs/expfs.c:get_name() opens a directory with:
file = dentry_open(dget(dentry), NULL, O_RDONLY); which results in file where file->f_vfsmnt == NULL.

Quoted 9 lines
Quoted 5 lines

Then fs/readdir.c:vfs_readdir() and, therefore, include/linux/fs.h:file_accessed(file) are called. file_accessed() calls fs/inode.c:touch_atime() which tryies to dereference mnt which is NULL.

I think you're looking at the -mm tree, in which Christoph changed all that stuff.

Ah, sorry, yes, I found that in 2.6.15-rc5-mm3