Linux block layer
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: syzbot <syzbot+f4353e96f7004ae5a09e@syzkaller.appspotmail.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [syzbot] [block?] BUG: corrupted list in blk_mq_request_bypass_insert
Date: Tue, 1 Sep 2026 08:49:10 -0600	[thread overview]
Message-ID: <apbl5hqGl6l4uAM7@kbusch-mbp> (raw)
In-Reply-To: <164f232c-45ed-4b77-84f8-c36987c891e5@acm.org>

On Mon, Aug 31, 2026 at 01:55:37PM -0700, Bart Van Assche wrote:
> On 8/31/26 7:58 AM, Keith Busch wrote:
> > We want to be able to retry eligible commands that were caught in the
> > crossfire of a controller reset.
> 
> Got it. Is my understanding correct that the NVMe driver may trigger the
> following call chain for a request that is already on the hctx dispatch
> list?
> 
> nvme_cancel_tagset()
>   blk_mq_tagset_busy_iter()
>     nvme_cancel_request()
>       nvme_pci_complete_rq()
>         nvme_complete_rq()
>           nvme_retry_req()
>             blk_mq_requeue_request()
>               spin_lock_irqsave(&q->requeue_lock, flags);
>               list_add_tail(&rq->queuelist, &q->requeue_list);
>               spin_unlock_irqrestore(&q->requeue_lock, flags);
> 
> Can this scenario trigger the list corruption reported by syzbot?

The list corruption is from inserting the same element into the list
twice, right? It could happen if the cancel request's completion raced
with a natural completion with a retryable error. We don't cancel until
bus master and interrupts are disabled on the device though, so it
shouldn't be possible for a completion to be posted after that. The bug
report indicates there may be a gap here.

      reply	other threads:[~2026-09-01 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29  5:31 [syzbot] [block?] BUG: corrupted list in blk_mq_request_bypass_insert syzbot
2026-08-30  0:16 ` Bart Van Assche
2026-08-31 14:58   ` Keith Busch
2026-08-31 20:55     ` Bart Van Assche
2026-09-01 14:49       ` Keith Busch [this message]

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=apbl5hqGl6l4uAM7@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+f4353e96f7004ae5a09e@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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