diff options
author | Ian Kent <raven@themaw.net> | 2008-05-01 13:35:07 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-01 17:04:01 +0200 |
commit | cab0936aac8aa907c6bb814c2cf26385478f254b (patch) | |
tree | 7f0bcb8838f9cc2fd461a6468464042c6b94e987 /fs/autofs4/waitq.c | |
parent | autofs4: fix sparse warning in waitq.c:autofs4_expire_indirect() (diff) | |
download | linux-cab0936aac8aa907c6bb814c2cf26385478f254b.tar.xz linux-cab0936aac8aa907c6bb814c2cf26385478f254b.zip |
autofs4: check for invalid dentry in getpath
Catch invalid dentry when calculating its path.
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | fs/autofs4/waitq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index 1fe28e4754c2..75e5955c3f6d 100644 --- a/fs/autofs4/waitq.c +++ b/fs/autofs4/waitq.c @@ -171,7 +171,7 @@ static int autofs4_getpath(struct autofs_sb_info *sbi, for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent) len += tmp->d_name.len + 1; - if (--len > NAME_MAX) { + if (!len || --len > NAME_MAX) { spin_unlock(&dcache_lock); return 0; } |