Skip to content

Commit

Permalink
fuse: fix oops in revalidate when called with NULL nameidata
Browse files Browse the repository at this point in the history
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
e7c0a16 "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>
  • Loading branch information
Miklos Szeredi committed May 10, 2011
1 parent 693d92a commit d243390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d243390

Please sign in to comment.