1
0
Fork 0

fuse: fix oops in revalidate when called with NULL nameidata

Some cases (e.g. ecryptfs) can call ->dentry_revalidate with NULL
nameidata.

https://bugzilla.kernel.org/show_bug.cgi?id=34732

Tyler Hicks pointed out that this bug was introduced by commit
e7c0a16786 "fuse: make fuse_dentry_revalidate() RCU aware"

Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
hifive-unleashed-5.1
Miklos Szeredi 2011-05-10 17:35:58 +02:00
parent 693d92a1bb
commit d24339059d
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
if (!inode)
return 0;
if (nd->flags & LOOKUP_RCU)
if (nd && (nd->flags & LOOKUP_RCU))
return -ECHILD;
fc = get_fuse_conn(inode);