summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Yudaken <dylany@meta.com>2022-11-07 13:52:35 +0100
committerJens Axboe <axboe@kernel.dk>2022-11-21 15:44:09 +0100
commite2ad599d1ed38fe743106f10d58a0cbfc00b51e2 (patch)
tree1c453da112db3980e4584f0828a1741c2dffca5a
parentio_uring: revert "io_uring fix multishot accept ordering" (diff)
downloadlinux-e2ad599d1ed38fe743106f10d58a0cbfc00b51e2.tar.xz
linux-e2ad599d1ed38fe743106f10d58a0cbfc00b51e2.zip
io_uring: allow multishot recv CQEs to overflow
With commit aa1df3a360a0 ("io_uring: fix CQE reordering"), there are stronger guarantees for overflow ordering. Specifically ensuring that userspace will not receive out of order receive CQEs. Therefore this is not needed any more for recv/recvmsg. Signed-off-by: Dylan Yudaken <dylany@meta.com> Link: https://lore.kernel.org/r/20221107125236.260132-4-dylany@meta.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/net.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index f7b2b068464d..0de6f78ad978 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -602,15 +602,11 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
if (!mshot_finished) {
if (io_post_aux_cqe(req->ctx, req->cqe.user_data, *ret,
- cflags | IORING_CQE_F_MORE, false)) {
+ cflags | IORING_CQE_F_MORE, true)) {
io_recv_prep_retry(req);
return false;
}
- /*
- * Otherwise stop multishot but use the current result.
- * Probably will end up going into overflow, but this means
- * we cannot trust the ordering anymore
- */
+ /* Otherwise stop multishot but use the current result. */
}
io_req_set_res(req, *ret, cflags);