Skip to content

Commit 93dc610

Browse files
jibarontorvalds
authored andcommitted
Don't limit non-nested epoll paths
Commit 28d82dc ("epoll: limit paths") that I did to limit the number of possible wakeup paths in epoll is causing a few applications to longer work (dovecot for one). The original patch is really about limiting the amount of epoll nesting (since epoll fds can be attached to other fds). Thus, we probably can allow an unlimited number of paths of depth 1. My current patch limits it at 1000. And enforce the limits on paths that have a greater depth. This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578 Signed-off-by: Jason Baron <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c579bc7 commit 93dc610

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/eventpoll.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
988988

989989
static int path_count_inc(int nests)
990990
{
991+
/* Allow an arbitrary number of depth 1 paths */
992+
if (nests == 0)
993+
return 0;
994+
991995
if (++path_count[nests] > path_limits[nests])
992996
return -1;
993997
return 0;

0 commit comments

Comments
 (0)