summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2024-12-03 11:31:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 20:03:26 +0100
commit793e560a6b7ca99c3dedc1b717645d07fa5cff8e (patch)
tree995e6976296bb6ee0f505695b5c34910324016b9 /io_uring
parent74aaafabd3c1cfd076c82ce2156f702096b4d163 (diff)
downloadlinux-793e560a6b7ca99c3dedc1b717645d07fa5cff8e.tar.gz
linux-793e560a6b7ca99c3dedc1b717645d07fa5cff8e.tar.bz2
linux-793e560a6b7ca99c3dedc1b717645d07fa5cff8e.zip
io_uring: Change res2 parameter type in io_uring_cmd_done
commit a07d2d7930c75e6bf88683b376d09ab1f3fed2aa upstream. Change the type of the res2 parameter in io_uring_cmd_done from ssize_t to u64. This aligns the parameter type with io_req_set_cqe32_extra, which expects u64 arguments. The change eliminates potential issues on 32-bit architectures where ssize_t might be 32-bit. Only user of passing res2 is drivers/nvme/host/ioctl.c and it actually passes u64. Fixes: ee692a21e9bf ("fs,io_uring: add infrastructure for uring-cmd") Cc: stable@vger.kernel.org Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Tested-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Li Zetao <lizetao1@huawei.com> Signed-off-by: Bernd Schubert <bschubert@ddn.com> Link: https://lore.kernel.org/r/20241203-io_uring_cmd_done-res2-as-u64-v2-1-5e59ae617151@ddn.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/uring_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index 39c3c816ec78..883510a3e8d0 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -147,7 +147,7 @@ static inline void io_req_set_cqe32_extra(struct io_kiocb *req,
* Called by consumers of io_uring_cmd, if they originally returned
* -EIOCBQUEUED upon receiving the command.
*/
-void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2,
+void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, u64 res2,
unsigned issue_flags)
{
struct io_kiocb *req = cmd_to_io_kiocb(ioucmd);