Files
msm-5.15/include/uapi/linux/eventpoll.h
Jens Axboe b4ab4ac900 UPSTREAM: eventpoll: add EPOLL_URING_WAKE poll wakeup flag
[ Upstream commit caf1aeaffc3b09649a56769e559333ae2c4f1802 ]

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: I059763b74e5e472652253043ee4b2c0c784ad919
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit a2d8ff00a7)
Bug: 268174392
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-01 12:03:29 +00:00

3.0 KiB