projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afec570
)
autofs4: check for invalid dentry in getpath
author
Ian Kent
<raven@themaw.net>
Thu, 1 May 2008 11:35:07 +0000
(
04:35
-0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Thu, 1 May 2008 15:04:01 +0000
(08:04 -0700)
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>
fs/autofs4/waitq.c
patch
|
blob
|
history
diff --git
a/fs/autofs4/waitq.c
b/fs/autofs4/waitq.c
index
1fe28e4
..
75e5955
100644
(file)
--- 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;
}