On 23. 01. 24, 0:55, Greg Kroah-Hartman wrote:
6.7-stable review patch. If anyone has any objections, please let me know.
Hi,
6.7.2 fails in liburing tests (both x64 and x86-32 lib on x64 kernel): [ 115s] Tests failed (5): <fd-pass.t> <msg-ring-overflow.t> <pipe-bug.t> <poll-race-mshot.t> <reg-hint.t>
I cannot reproduce locally, that happens only in openSUSE build machinery (the errors are transient, the links might not be valid in the future): https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:H... https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:H...
So I cannot tell if 6.8-rc is affected.
I suspect one of the 6.7.2 uring changes: e24bf5b47a57 io_uring: adjust defer tw counting 22eed9134509 io_uring: ensure local task_work is run on wait timeout ba8d8a8a36b2 io_uring/rw: ensure io->bytes_done is always initialized d413a342275d io_uring: don't check iopoll if request completes
It looks like EINVAL is received unexpectedly (see below). Any ideas?
The tests' failures:
[ 53s] Running test fd-pass.t msg_ring failed -22 [ 53s] test failed 0 2 [ 53s] msg_ring failed -22 [ 53s] test failed 1 1 [ 53s] msg_ring failed -22 [ 53s] test failed 1 0 [ 53s] io_uring_register_file_alloc_range -22 [ 53s] test failed 1 ALLOC [ 53s] Test fd-pass.t failed with ret 1
[ 65s] Running test msg-ring-overflow.t Destination ring create failed -22 [ 65s] test defer failed [ 65s] Test msg-ring-overflow.t failed with ret 1
[ 75s] Running test pipe-bug.t pipe-bug.c:73 io_uring_wait_cqe_timeout(&ring, &cqe, &to) == 0 failed [ 75s] Test pipe-bug.t failed with ret 1
[ 76s] Running test poll-race-mshot.t Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 ... a lot of these [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Bad cqe res 0 [ 76s] Only got 1 requests [ 76s] Test mshot failed loop 0 [ 76s] Test poll-race-mshot.t failed with ret 1
[ 84s] Running test reg-hint.t Bad CQE res: -22 [ 84s] Test reg-hint.t failed with ret 1
From: Pavel Begunkov asml.silence@gmail.com
commit 9b43ef3d52532a0175ed6654618f7db61d390d2e upstream.
IOPOLL request should never return IOU_OK, so the following iopoll queueing check in io_issue_sqe() after getting IOU_OK doesn't make any sense as would never turn true. Let's optimise on that and return a bit earlier. It's also much more resilient to potential bugs from mischieving iopoll implementations.
Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov asml.silence@gmail.com Link: https://lore.kernel.org/r/2f8690e2fa5213a2ff292fac29a7143c036cdd60.170139092... Signed-off-by: Jens Axboe axboe@kernel.dk Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
io_uring/io_uring.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
--- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1898,7 +1898,11 @@ static int io_issue_sqe(struct io_kiocb io_req_complete_defer(req); else io_req_complete_post(req, issue_flags);
- } else if (ret != IOU_ISSUE_SKIP_COMPLETE)
return 0;
- }
- if (ret != IOU_ISSUE_SKIP_COMPLETE) return ret;
/* If the op doesn't have a file, we're not polling for it */