public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd
@ 2022-06-16 13:50 Dylan Yudaken
  2022-06-16 13:53 ` Pavel Begunkov
  2022-06-16 15:14 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Dylan Yudaken @ 2022-06-16 13:50 UTC (permalink / raw)
  To: axboe, asml.silence, io-uring; +Cc: Kernel-team, Dylan Yudaken

io_req_task_prio_work_add has a strict assumption that it will only be
used with io_req_task_complete. There is a codepath that assumes this is
the case and will not even call the completion function if it is hit.

For uring_cmd with an arbitrary completion function change the call to the
correct non-priority version.

Fixes: ee692a21e9bf8 ("fs,io_uring: add infrastructure for uring-cmd")
Signed-off-by: Dylan Yudaken <[email protected]>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3aab4182fd89..a7ac2d3bce76 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -5079,7 +5079,7 @@ void io_uring_cmd_complete_in_task(struct io_uring_cmd *ioucmd,
 
 	req->uring_cmd.task_work_cb = task_work_cb;
 	req->io_task_work.func = io_uring_cmd_work;
-	io_req_task_prio_work_add(req);
+	io_req_task_work_add(req);
 }
 EXPORT_SYMBOL_GPL(io_uring_cmd_complete_in_task);
 

base-commit: b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd
  2022-06-16 13:50 [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd Dylan Yudaken
@ 2022-06-16 13:53 ` Pavel Begunkov
  2022-06-16 15:14 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Begunkov @ 2022-06-16 13:53 UTC (permalink / raw)
  To: Dylan Yudaken, axboe, io-uring; +Cc: Kernel-team

On 6/16/22 14:50, Dylan Yudaken wrote:
> io_req_task_prio_work_add has a strict assumption that it will only be
> used with io_req_task_complete. There is a codepath that assumes this is
> the case and will not even call the completion function if it is hit.
> 
> For uring_cmd with an arbitrary completion function change the call to the
> correct non-priority version.

Reviewed-by: Pavel Begunkov <[email protected]>



> Fixes: ee692a21e9bf8 ("fs,io_uring: add infrastructure for uring-cmd")
> Signed-off-by: Dylan Yudaken <[email protected]>
> ---
>   fs/io_uring.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index 3aab4182fd89..a7ac2d3bce76 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -5079,7 +5079,7 @@ void io_uring_cmd_complete_in_task(struct io_uring_cmd *ioucmd,
>   
>   	req->uring_cmd.task_work_cb = task_work_cb;
>   	req->io_task_work.func = io_uring_cmd_work;
> -	io_req_task_prio_work_add(req);
> +	io_req_task_work_add(req);
>   }
>   EXPORT_SYMBOL_GPL(io_uring_cmd_complete_in_task);
>   
> 
> base-commit: b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd
  2022-06-16 13:50 [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd Dylan Yudaken
  2022-06-16 13:53 ` Pavel Begunkov
@ 2022-06-16 15:14 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2022-06-16 15:14 UTC (permalink / raw)
  To: asml.silence, io-uring, dylany; +Cc: Kernel-team

On Thu, 16 Jun 2022 06:50:11 -0700, Dylan Yudaken wrote:
> io_req_task_prio_work_add has a strict assumption that it will only be
> used with io_req_task_complete. There is a codepath that assumes this is
> the case and will not even call the completion function if it is hit.
> 
> For uring_cmd with an arbitrary completion function change the call to the
> correct non-priority version.
> 
> [...]

Applied, thanks!

[1/1] io_uring: do not use prio task_work_add in uring_cmd
      commit: 32fc810b364f3dd30930c594e461ffa1761fef39

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-16 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-16 13:50 [PATCH 5.19] io_uring: do not use prio task_work_add in uring_cmd Dylan Yudaken
2022-06-16 13:53 ` Pavel Begunkov
2022-06-16 15:14 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox