mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
UPSTREAM: eventpoll: add EPOLL_URING_WAKE poll wakeup flag
[ Upstream commitcaf1aeaffc] We can have dependencies between epoll and io_uring. Consider an epoll context, identified by the epfd file descriptor, and an io_uring file descriptor identified by iofd. If we add iofd to the epfd context, and arm a multishot poll request for epfd with iofd, then the multishot poll request will repeatedly trigger and generate events until terminated by CQ ring overflow. This isn't a desired behavior. Add EPOLL_URING so that io_uring can pass it in as part of the poll wakeup key, and io_uring can check for that to detect a potential recursive invocation. Cc: stable@vger.kernel.org # 6.0 Change-Id: Ifafcb236b2cfe3ca3e7254a0155625fce00fd038 Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit2f09377502) Bug: 268174392 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7c9f38c09b
commit
d7a47b29d5
@@ -41,6 +41,12 @@
|
||||
#define EPOLLMSG (__force __poll_t)0x00000400
|
||||
#define EPOLLRDHUP (__force __poll_t)0x00002000
|
||||
|
||||
/*
|
||||
* Internal flag - wakeup generated by io_uring, used to detect recursion back
|
||||
* into the io_uring poll handler.
|
||||
*/
|
||||
#define EPOLL_URING_WAKE ((__force __poll_t)(1U << 27))
|
||||
|
||||
/* Set exclusive wakeup mode for the target file descriptor */
|
||||
#define EPOLLEXCLUSIVE ((__force __poll_t)(1U << 28))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user