Don't limit non-nested epoll paths
[firefly-linux-kernel-4.4.55.git] / fs / eventpoll.c
index 6879d0c5cb5bdb69e1c61159c2a574e4f5680d71..35a852a2682f5c9e4625f2feff3f7996e13f6bfa 100644 (file)
@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
 
 static int path_count_inc(int nests)
 {
+       /* Allow an arbitrary number of depth 1 paths */
+       if (nests == 0)
+               return 0;
+
        if (++path_count[nests] > path_limits[nests])
                return -1;
        return 0;