Linux block layer
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Chris Leech <cleech@redhat.com>,
	Marco Patalano <mpatalan@redhat.com>,
	ming.lei@redhat.com
Subject: Re: [PATCH] blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops
Date: Wed, 15 Mar 2023 09:18:56 +0800	[thread overview]
Message-ID: <ZBEdAIhaq/5ymewd@ovpn-8-22.pek2.redhat.com> (raw)
In-Reply-To: <20230310010913.1014789-1-ming.lei@redhat.com>

On Fri, Mar 10, 2023 at 09:09:13AM +0800, Ming Lei wrote:
> From: Chris Leech <cleech@redhat.com>
> 
> 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@redhat.com>
> Signed-off-by: Chris Leech <cleech@redhat.com>
> Signed-off-by: Ming Lei <ming.lei@redhat.com>

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


  reply	other threads:[~2023-03-15  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  1:09 [PATCH] blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops Ming Lei
2023-03-15  1:18 ` Ming Lei [this message]
2023-03-15  1:21 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBEdAIhaq/5ymewd@ovpn-8-22.pek2.redhat.com \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=cleech@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatalan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox