io_uring: fix CQE reordering
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 23 Sep 2022 13:53:25 +0000 (14:53 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Sep 2022 21:04:20 +0000 (15:04 -0600)
commitaa1df3a360a0c50e0f0086a785d75c2785c29967
treea02d7afe126c810f9e0c32dcf7982c7a01027f2e
parenta75155faef4efcb9791f77e2652e29ce8906e05a
io_uring: fix CQE reordering

Overflowing CQEs may result in reordering, which is buggy in case of
links, F_MORE and so on. If we guarantee that we don't reorder for
the unlikely event of a CQ ring overflow, then we can further extend
this to not have to terminate multishot requests if it happens. For
other operations, like zerocopy sends, we have no choice but to honor
CQE ordering.

Reported-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/ec3bc55687b0768bbe20fb62d7d06cfced7d7e70.1663892031.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h