diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-05-10 17:35:58 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-05-10 17:35:58 +0200 |
commit | d24339059d640f108c08ba99ef30e3bafa10f8e4 (patch) | |
tree | 934d3c4f2abcddbfdbb52904d0b96c5a1915acd1 /fs/fuse/dir.c | |
parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) |
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>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index c6ba49bd95b..b32eb29a4e6 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -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); |