Skip to content
Snippets Groups Projects
Commit 0c320f77 authored by Al Viro's avatar Al Viro
Browse files

reverse_path_check_proc(): don't bother with cookies


We know there's no loops by the time we call it; the
only thing we care about is too deep reverse paths.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent aebf15f0
No related branches found
No related tags found
No related merge requests found
......@@ -1311,7 +1311,7 @@ static int reverse_path_check_proc(struct file *file, int depth)
int error = 0;
struct epitem *epi;
if (!ep_push_nested(file)) /* limits recursion */
if (depth > EP_MAX_NESTS) /* too deep nesting */
return -1;
/* CTL_DEL can remove links here, but that can't increase our count */
......@@ -1336,7 +1336,6 @@ static int reverse_path_check_proc(struct file *file, int depth)
}
}
rcu_read_unlock();
nesting--; /* pop */
return error;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment