On Tue, Aug 03, 2021 at 03:06:08PM +0800, Ming Lei wrote: > blkcg->lock depends on q->queue_lock which may depend on another driver > lock required in irq context, one example is dm-thin: > > Chain exists of: > &pool->lock#3 --> &q->queue_lock --> &blkcg->lock > > Possible interrupt unsafe locking scenario: > > CPU0 CPU1 > ---- ---- > lock(&blkcg->lock); > local_irq_disable(); > lock(&pool->lock#3); > lock(&q->queue_lock); > <Interrupt> > lock(&pool->lock#3); > > Fix the issue by using spin_lock_irq(&blkcg->lock) in ioc_weight_write(). > > Cc: Tejun Heo <tj@xxxxxxxxxx> > Reported-by: Bruno Goncalves <bgoncalv@xxxxxxxxxx> > Link: https://lore.kernel.org/linux-block/CA+QYu4rzz6079ighEanS3Qq_Dmnczcf45ZoJoHKVLVATTo1e4Q@xxxxxxxxxxxxxx/T/#u > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Acked-by: Tejun Heo <tj@xxxxxxxxxx> Thanks. -- tejun