Commit d2433905 authored by Miklos Szeredi's avatar Miklos Szeredi

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
e7c0a167 "fuse: make fuse_dentry_revalidate() RCU aware"
Reported-by: default avatarWitold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 693d92a1
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment