* [PATCH] io_uring: pass correct parameters to io_req_set_res
@ 2022-08-03 11:09 Ming Lei
2022-08-03 11:40 ` Pavel Begunkov
0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2022-08-03 11:09 UTC (permalink / raw)
To: Jens Axboe, io-uring; +Cc: Ming Lei, Pavel Begunkov
The two parameters of 'res' and 'cflags' are swapped, so fix it.
Without this fix, 'ublk del' hangs forever.
Cc: Pavel Begunkov <[email protected]>
Fixes: 27a9d66fec77 ("io_uring: kill extra io_uring_types.h includes")
Signed-off-by: Ming Lei <[email protected]>
---
io_uring/uring_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index 0a421ed51e7e..849d9708d612 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -46,7 +46,7 @@ void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2)
if (ret < 0)
req_set_fail(req);
- io_req_set_res(req, 0, ret);
+ io_req_set_res(req, ret, 0);
if (req->ctx->flags & IORING_SETUP_CQE32)
io_req_set_cqe32_extra(req, res2, 0);
__io_req_complete(req, 0);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring: pass correct parameters to io_req_set_res
2022-08-03 11:09 [PATCH] io_uring: pass correct parameters to io_req_set_res Ming Lei
@ 2022-08-03 11:40 ` Pavel Begunkov
2022-08-03 11:59 ` Ming Lei
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Begunkov @ 2022-08-03 11:40 UTC (permalink / raw)
To: Ming Lei, Jens Axboe, io-uring
On 8/3/22 12:09, Ming Lei wrote:
> The two parameters of 'res' and 'cflags' are swapped, so fix it.
> Without this fix, 'ublk del' hangs forever.
Looks good, but the "Fixes" tag is not right
Fixes: de23077eda61f ("io_uring: set completion results upfront")
> Cc: Pavel Begunkov <[email protected]>
> Fixes: 27a9d66fec77 ("io_uring: kill extra io_uring_types.h includes")
> Signed-off-by: Ming Lei <[email protected]>
> ---
> io_uring/uring_cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
> index 0a421ed51e7e..849d9708d612 100644
> --- a/io_uring/uring_cmd.c
> +++ b/io_uring/uring_cmd.c
> @@ -46,7 +46,7 @@ void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2)
> if (ret < 0)
> req_set_fail(req);
>
> - io_req_set_res(req, 0, ret);
> + io_req_set_res(req, ret, 0);
> if (req->ctx->flags & IORING_SETUP_CQE32)
> io_req_set_cqe32_extra(req, res2, 0);
> __io_req_complete(req, 0);
--
Pavel Begunkov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring: pass correct parameters to io_req_set_res
2022-08-03 11:40 ` Pavel Begunkov
@ 2022-08-03 11:59 ` Ming Lei
0 siblings, 0 replies; 3+ messages in thread
From: Ming Lei @ 2022-08-03 11:59 UTC (permalink / raw)
To: Pavel Begunkov; +Cc: Jens Axboe, io-uring
On Wed, Aug 03, 2022 at 12:40:17PM +0100, Pavel Begunkov wrote:
> On 8/3/22 12:09, Ming Lei wrote:
> > The two parameters of 'res' and 'cflags' are swapped, so fix it.
> > Without this fix, 'ublk del' hangs forever.
>
> Looks good, but the "Fixes" tag is not right
>
> Fixes: de23077eda61f ("io_uring: set completion results upfront")
Indeed, the issue is firstly added in above commit.
Thanks,
Ming
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-03 12:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-03 11:09 [PATCH] io_uring: pass correct parameters to io_req_set_res Ming Lei
2022-08-03 11:40 ` Pavel Begunkov
2022-08-03 11:59 ` Ming Lei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox