[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168614595209.134969.6798849940705397930.b4-ty@kernel.dk>
Date: Wed, 07 Jun 2023 07:52:32 -0600
From: Jens Axboe <axboe@...nel.dk>
To: hch@....de, yukuai3@...wei.com, Yu Kuai <yukuai1@...weicloud.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH -next] blk-ioc: fix recursive spin_lock/unlock_irq() in
ioc_clear_queue()
On Tue, 06 Jun 2023 09:14:38 +0800, Yu Kuai wrote:
> Recursive spin_lock/unlock_irq() is not safe, because spin_unlock_irq()
> will enable irq unconditionally:
>
> spin_lock_irq queue_lock -> disable irq
> spin_lock_irq ioc->lock
> spin_unlock_irq ioc->lock -> enable irq
> /*
> * AA dead lock will be triggered if current context is preempted by irq,
> * and irq try to hold queue_lock again.
> */
> spin_unlock_irq queue_lock
>
> [...]
Applied, thanks!
[1/1] blk-ioc: fix recursive spin_lock/unlock_irq() in ioc_clear_queue()
commit: a7cfa0af0c88353b4eb59db5a2a0fbe35329b3f9
Best regards,
--
Jens Axboe
Powered by blists - more mailing lists