If io_rw_should_reissue() fails in iopoll path and we can't reissue we fail the request. Don't forget to also mark it as failed, so links are broken.
Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov asml.silence@gmail.com --- fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c index 0d7613c7355c..40b1697e7354 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2687,6 +2687,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) req->flags |= REQ_F_REISSUE; return; } + req_set_fail(req); req->result = res; }
On Sun, Oct 17, 2021 at 08:30:55PM +0000, Pavel Begunkov wrote:
If io_rw_should_reissue() fails in iopoll path and we can't reissue we fail the request. Don't forget to also mark it as failed, so links are broken.
Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov asml.silence@gmail.com
fs/io_uring.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/fs/io_uring.c b/fs/io_uring.c index 0d7613c7355c..40b1697e7354 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2687,6 +2687,7 @@ static void io_complete_rw_iopoll(struct kiocb *kiocb, long res, long res2) req->flags |= REQ_F_REISSUE; return; }
req->result = res; }req_set_fail(req);
2.33.1
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.
</formletter>
linux-stable-mirror@lists.linaro.org