From 7fdfffce508f38d89338e8bbed421dd91ddfcb3f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 21 Apr 2026 16:41:32 -0600 Subject: [PATCH 1/2] io_uring/poll: fix EPOLL_URING_WAKE sometimes not being masked in Rather than do it only when we jump straight to execution, mark it regardless. This ensures it doesn't get lost. Fixes: ccf06b5a981c ("io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups") Signed-off-by: Jens Axboe --- io_uring/io_uring.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 38decfc1a914..db5c9fbdec3b 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -5794,17 +5794,16 @@ static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, if (mask && !(mask & poll->events)) return 0; - if (io_poll_get_ownership(req)) { - /* - * If we trigger a multishot poll off our own wakeup path, - * disable multishot as there is a circular dependency between - * CQ posting and triggering the event. - */ - if (mask & EPOLL_URING_WAKE) - poll->events |= EPOLLONESHOT; + /* + * If we trigger a multishot poll off our own wakeup path, + * disable multishot as there is a circular dependency between + * CQ posting and triggering the event. + */ + if (mask & EPOLL_URING_WAKE) + poll->events |= EPOLLONESHOT; + if (io_poll_get_ownership(req)) __io_poll_execute(req, mask); - } return 1; } -- 2.53.0