Re: [PATCH] io_uring: fix possible deadlock in io_register_iowq_max_workers()
From: Jens Axboe
Date: Tue Jun 04 2024 - 09:45:59 EST
On Tue, 04 Jun 2024 13:05:27 +0000, Hagar Hemdan wrote:
> The io_register_iowq_max_workers() function calls io_put_sq_data(),
> which acquires the sqd->lock without releasing the uring_lock.
> Similar to the commit 009ad9f0c6ee ("io_uring: drop ctx->uring_lock
> before acquiring sqd->lock"), this can lead to a potential deadlock
> situation.
>
> To resolve this issue, the uring_lock is released before calling
> io_put_sq_data(), and then it is re-acquired after the function call.
>
> [...]
Applied, thanks!
[1/1] io_uring: fix possible deadlock in io_register_iowq_max_workers()
commit: a59035de589f31f195ed1fff97007d332552a72b
Best regards,
--
Jens Axboe