From: Jens Axboe <axboe@kernel.dk>
To: stable@vger.kernel.org
Subject: [PATCH 6.1.y 3/4] io_uring/rw: fail soft links on IOPOLL short or error IO
Date: Sat, 21 Nov 2026 21:30:05 +0000 [thread overview]
Message-ID: <20261121213006.1787626-4-axboe@kernel.dk> (raw)
In-Reply-To: <20261121213006.1787626-1-axboe@kernel.dk>
From: Yang Xiuwei <yangxiuwei@kylinos.cn>
Commit 4d3db66c5363dcf42c3d43ebaea330ac2d1888bb upstream.
io_complete_rw_iopoll() updates cqe.res when the transfer does not
match the requested length, but it does not call req_set_fail().
Soft linked requests then still run after a short or failed IOPOLL
read or write.
Fixes: b66ceaf324b3 ("io_uring: move iopoll reissue into regular IO path")
Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Link: https://patch.msgid.link/20261114072246.741950-3-yangxiuwei@kylinos.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[axboe: 6.1 reissues from inside the res != cqe.res branch, fail the
request after the reissue check there]
---
io_uring/rw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 8c38449dd7da..268f4e923997 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -304,6 +304,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res)
req->flags |= REQ_F_REISSUE | REQ_F_PARTIAL_IO;
return;
}
+ req_set_fail(req);
req->cqe.res = res;
}
--
2.55.0
next prev parent reply other threads:[~2026-11-21 21:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 21:30 [PATCH 6.1.y 0/4] io_uring fixes for 6.1-stable Jens Axboe
2026-11-21 21:30 ` [PATCH 6.1.y 1/4] io_uring: enable toggle of iowait usage when waiting on CQEs Jens Axboe
2026-11-21 21:30 ` [PATCH 6.1.y 2/4] io_uring: fail soft links on negative IOU_COMPLETE results Jens Axboe
2026-11-21 21:30 ` Jens Axboe [this message]
2026-11-21 21:30 ` [PATCH 6.1.y 4/4] io_uring/rsrc: keep the old file when a file update fails Jens Axboe
2026-11-22 3:38 ` [PATCH 6.1.y 0/4] io_uring fixes for 6.1-stable Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261121213006.1787626-4-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.