Re: [PATCH] blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops

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

 



On Fri, Mar 10, 2023 at 09:09:13AM +0800, Ming Lei wrote:
> From: Chris Leech <cleech@xxxxxxxxxx>
> 
> The 'q' parameter of the macro __blk_mq_run_dispatch_ops may not be one
> local variable, such as, it is rq->q, then request queue pointed by
> this variable could be changed to another queue in case of
> BLK_MQ_F_TAG_QUEUE_SHARED after 'dispatch_ops' returns, then
> 'bad unlock balance' is triggered.
> 
> Fixes the issue by adding one local variable for doing srcu lock/unlock.
> 
> Fixes: 2a904d00855f ("blk-mq: remove hctx_lock and hctx_unlock")
> Cc: Marco Patalano <mpatalan@xxxxxxxxxx>
> Signed-off-by: Chris Leech <cleech@xxxxxxxxxx>
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>

Hi Jens,

This patch fixes one hang issue on blk_mq_quiesce_queue(), so could you
make it to v6.3 if you are fine?


Thanks,
Ming




[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