projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aebf15f
)
reverse_path_check_proc(): don't bother with cookies
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 25 Sep 2020 23:48:56 +0000
(19:48 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 26 Oct 2020 00:01:53 +0000
(20:01 -0400)
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: Al Viro <viro@zeniv.linux.org.uk>
fs/eventpoll.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/eventpoll.c
b/fs/eventpoll.c
index 3e6f1f97f246ab1011bd45330af1826f27a80cb3..0f540e91aa92de5e7a70f8490625191ad0cbd9e4 100644
(file)
--- a/
fs/eventpoll.c
+++ b/
fs/eventpoll.c
@@
-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;
}