From 2274e894b4b6c7f41eb4d714d4505e2ec661e0e6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Jan 2023 18:12:40 +0100 Subject: [PATCH] 5.10-stable patches added patches: io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch --- ...parison-with-zero-in-io_fixup_rw_res.patch | 32 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 33 insertions(+) create mode 100644 queue-5.10/io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch diff --git a/queue-5.10/io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch b/queue-5.10/io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch new file mode 100644 index 00000000000..8624e1ee902 --- /dev/null +++ b/queue-5.10/io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch @@ -0,0 +1,32 @@ +From harshit.m.mogalapalli@oracle.com Tue Jan 10 18:11:33 2023 +From: Harshit Mogalapalli +Date: Tue, 10 Jan 2023 08:46:47 -0800 +Subject: io_uring: Fix unsigned 'res' comparison with zero in io_fixup_rw_res() +Cc: stable@vger.kernel.org, harshit.m.mogalapalli@oracle.com, error27@gmail.com, darren.kenny@oracle.com, Jens Axboe , Pavel Begunkov , Greg Kroah-Hartman , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org +Message-ID: <20230110164647.755556-1-harshit.m.mogalapalli@oracle.com> + +From: Harshit Mogalapalli + +Smatch warning: io_fixup_rw_res() warn: + unsigned 'res' is never less than zero. + +Change type of 'res' from unsigned to long. + +Fixes: d6b7efc722a2 ("io_uring/rw: fix error'ed retry return values") +Signed-off-by: Harshit Mogalapalli +Signed-off-by: Greg Kroah-Hartman +--- + io_uring/io_uring.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/io_uring/io_uring.c ++++ b/io_uring/io_uring.c +@@ -2702,7 +2702,7 @@ static bool __io_complete_rw_common(stru + return false; + } + +-static inline int io_fixup_rw_res(struct io_kiocb *req, unsigned res) ++static inline int io_fixup_rw_res(struct io_kiocb *req, long res) + { + struct io_async_rw *io = req->async_data; + diff --git a/queue-5.10/series b/queue-5.10/series index 41d596e642e..cb3ac4d7b52 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -769,3 +769,4 @@ hfs-hfsplus-use-warn_on-for-sanity-check.patch hfs-hfsplus-avoid-warn_on-for-sanity-check-use-proper-error-handling.patch mbcache-avoid-nesting-of-cache-c_list_lock-under-bit-locks.patch efi-random-combine-bootloader-provided-rng-seed-with-rng-protocol-output.patch +io_uring-fix-unsigned-res-comparison-with-zero-in-io_fixup_rw_res.patch -- 2.47.3