Re: [PATCH] blk-iocost: fix lockdep warning on blkcg->lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/3/21 1:06 AM, 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().

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux