diff mbox series

[1/3] io_uring: fix mshot io-wq checks

Message ID d8c5b36a39258036f93301cd60d3cd295e40653d.1709905727.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series net mshot fixes and improvements | expand

Commit Message

Pavel Begunkov March 8, 2024, 1:55 p.m. UTC
When checking for concurrent CQE posting, we're not only interested in
requests running from the poll handler but also strayed requests ended
up in normal io-wq execution. We're disallowing multishots in general
from io-wq, not only when they came in a certain way.

Cc: stable@vger.kernel.org
Fixes: 17add5cea2bba ("io_uring: force multishot CQEs into task context")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 io_uring/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/io_uring/net.c b/io_uring/net.c
index 52f0d3b735fd..d4ab4bdaf845 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -87,7 +87,7 @@  static inline bool io_check_multishot(struct io_kiocb *req,
 	 * generic paths but multipoll may decide to post extra cqes.
 	 */
 	return !(issue_flags & IO_URING_F_IOWQ) ||
-		!(issue_flags & IO_URING_F_MULTISHOT) ||
+		!(req->flags & REQ_F_APOLL_MULTISHOT) ||
 		!req->ctx->task_complete;
 }