mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:19:34 +02:00
Revert "io_uring/epoll: disallow adding an epoll file to an epoll context"
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 cfa1539b24.
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user