]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "io_uring/epoll: disallow adding an epoll file to an epoll context"
authorJens Axboe <axboe@kernel.dk>
Thu, 30 Jul 2026 16:33:14 +0000 (10:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 30 Jul 2026 16:36:06 +0000 (10:36 -0600)
Turns out that my naive assumption that surely nobody is using io_uring
to manage nested epoll instances was wrong - libuv is in fact doing that
very thing. Since we have users in the wild using that feature, we
cannot remove it from upstream. Revert the commit that introduced that
limitation.

This reverts commit cfa1539b24aff18ecb71c6334e7270f810d145bb.

Link: https://lore.kernel.org/io-uring/605939add4dfb674bd7ab39ef8dbd3fd22e754e4.camel@xry111.site/
Reported-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/epoll.c

index eecd748cad018e392fd66c382df44197ebba7e48..b9db8bde27ec8c708a3e0b5e7b176e4201599a84 100644 (file)
@@ -62,9 +62,6 @@ int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags)
        CLASS(fd, tf)(ie->fd);
        if (fd_empty(tf))
                return -EBADF;
-       /* disallow adding an epoll context to another epoll context */
-       if (ie->op == EPOLL_CTL_ADD && is_file_epoll(fd_file(tf)))
-               return -EINVAL;
 
        key.file = fd_file(tf);
        key.fd = ie->fd;