Re: [PATCH] blk-ioc: protect ioc_destroy_icq() by 'queue_lock'

From: Jens Axboe
Date: Wed May 31 2023 - 12:21:19 EST



On Wed, 31 May 2023 15:34:35 +0800, Yu Kuai wrote:
> Currently, icq is tracked by both request_queue(icq->q_node) and
> task(icq->ioc_node), and ioc_clear_queue() from elevator exit is not
> safe because it can access the list without protection:
>
> ioc_clear_queue ioc_release_fn
> lock queue_lock
> list_splice
> /* move queue list to a local list */
> unlock queue_lock
> /*
> * lock is released, the local list
> * can be accessed through task exit.
> */
>
> [...]

Applied, thanks!

[1/1] blk-ioc: protect ioc_destroy_icq() by 'queue_lock'
commit: 2dea233fdc6a00e53bf2ee5cd4b6fca353fd81f8

Best regards,
--
Jens Axboe