linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Yi Zhang <yi.zhang@redhat.com>,
	linux-block <linux-block@vger.kernel.org>
Subject: Re: [bug report] kernel BUG at block/blk-mq.c:1042!
Date: Wed, 20 Oct 2021 08:21:31 -0600	[thread overview]
Message-ID: <1b2ac8f7-495e-abeb-80de-3d72af2ac7e0@kernel.dk> (raw)
In-Reply-To: <CAHj4cs80zAUc2grnCZ015-2Rvd-=gXRfB_dFKy=RTm+wRo09HQ@mail.gmail.com>

On 10/19/21 8:29 PM, Yi Zhang wrote:
> Hello
> 
> Below issue was triggered with blktests srp/ tests during CKI run on 
> linux-block/for-next, seems it was introduced from [2], and still can
> be reproduced with [1]
> 
> [1] 4ff840e57c84 Merge branch 'for-5.16/drivers' into for-next [2] 
> 59d62b58f120 Merge branch 'for-5.16/block' into for-next

Can you see if this helps? I don't think that check is valid anymore,
there are plenty of cases where queuelist may not be valid just yet,
but it doesn't mean that it's an issue for requeue. The check is
meant to catch someone doing requeue when the request is still
inserted.

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8b05a8f9bb33..a71aeed7b987 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1053,7 +1053,6 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list)
 	/* this request will be re-inserted to io scheduler queue */
 	blk_mq_sched_requeue_request(rq);
 
-	BUG_ON(!list_empty(&rq->queuelist));
 	blk_mq_add_to_requeue_list(rq, true, kick_requeue_list);
 }
 EXPORT_SYMBOL(blk_mq_requeue_request);

-- 
Jens Axboe


  reply	other threads:[~2021-10-20 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  2:29 [bug report] kernel BUG at block/blk-mq.c:1042! Yi Zhang
2021-10-20 14:21 ` Jens Axboe [this message]
2021-10-21  4:02   ` Yi Zhang

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=1b2ac8f7-495e-abeb-80de-3d72af2ac7e0@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=yi.zhang@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;
as well as URLs for NNTP newsgroup(s).