This is a note to let you know that I've just added the patch titled io_uring/rw: fix error'ed retry return values to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-rw-fix-error-ed-retry-return-values.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Mon Oct 17 11:43:27 AM CEST 2022 From: Pavel Begunkov <asml.silence@xxxxxxxxx> Date: Sun, 16 Oct 2022 22:42:57 +0100 Subject: io_uring/rw: fix error'ed retry return values To: stable@xxxxxxxxxxxxxxx Cc: Jens Axboe <axboe@xxxxxxxxx>, asml.silence@xxxxxxxxx Message-ID: <ebd1fd870c2f7048613f85fcdf3934f15301c1a7.1665954636.git.asml.silence@xxxxxxxxx> From: Pavel Begunkov <asml.silence@xxxxxxxxx> [ upstream commit 62bb0647b14646fa6c9aa25ecdf67ad18f13523c ] Kernel test robot reports that we test negativity of an unsigned in io_fixup_rw_res() after a recent change, which masks error codes and messes up the return value in case I/O is re-retried and failed with an error. Fixes: 4d9cb92ca41dd ("io_uring/rw: fix short rw error handling") Reported-by: kernel test robot <lkp@xxxxxxxxx> Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> Link: https://lore.kernel.org/r/9754a0970af1861e7865f9014f735c70dc60bf79.1663071587.git.asml.silence@xxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2701,7 +2701,7 @@ static bool __io_complete_rw_common(stru return false; } -static inline unsigned io_fixup_rw_res(struct io_kiocb *req, unsigned res) +static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res) { struct io_async_rw *io = req->async_data; Patches currently in stable-queue which might be from asml.silence@xxxxxxxxx are queue-5.15/io_uring-correct-pinned_vm-accounting.patch queue-5.15/io_uring-net-don-t-update-msg_name-if-not-provided.patch queue-5.15/io_uring-rw-fix-unexpected-link-breakage.patch queue-5.15/io_uring-rw-fix-error-ed-retry-return-values.patch queue-5.15/io_uring-rw-fix-short-rw-error-handling.patch queue-5.15/io_uring-af_unix-defer-registered-files-gc-to-io_uring-release.patch