From: Bart Van Assche <bvanassche@acm.org>
To: syzbot <syzbot+f4353e96f7004ae5a09e@syzkaller.appspotmail.com>,
axboe@kernel.dk, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [syzbot] [block?] BUG: corrupted list in blk_mq_request_bypass_insert
Date: Sat, 29 Aug 2026 17:16:00 -0700 [thread overview]
Message-ID: <2cf45e85-176a-4209-86ad-8f389a9a4282@acm.org> (raw)
In-Reply-To: <6a926eaf.1d9ded08.62e62.0102.GAE@google.com>
On 8/28/26 10:31 PM, syzbot wrote:
> kernel BUG at lib/list_debug.c:34!
> Call trace:
> __list_add_valid_or_report+0x144/0x148 lib/list_debug.c:32 (P)
> __list_add_valid include/linux/list.h:96 [inline]
> __list_add include/linux/list.h:158 [inline]
> list_add_tail include/linux/list.h:191 [inline]
> blk_mq_request_bypass_insert+0x130/0x1cc block/blk-mq.c:2551
> blk_mq_requeue_work+0x3a4/0x52c block/blk-mq.c:1560
> process_one_work kernel/workqueue.c:3322 [inline]
> process_scheduled_works+0x788/0x10b8 kernel/workqueue.c:3405
> worker_thread+0x798/0xbd0 kernel/workqueue.c:3486
> kthread+0x304/0x3d4 kernel/kthread.c:436
> ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:838
If my AI assistant got it right the root cause of this issue is as
follows (I haven't tried to verify this):
* Concurrent calls of nvme_reset_work() and blk_mq_requeue_work().
* nvme_decide_disposition() does not check NVME_REQ_CANCELLED for
non-multipath requests and returns RETRY instead of COMPLETE.
The same AI assistant proposes the following patch (again, I have not
verified whether this makes sense):
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 8e45a2789123..a1b2c3d4e5f6 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -425,7 +425,8 @@ static inline enum nvme_disposition
nvme_decide_disposition(struct request *req)
if (nvme_is_path_error(nvme_req(req)->status) ||
blk_queue_dying(req->q))
return FAILOVER;
} else {
- if (blk_queue_dying(req->q))
+ if (blk_queue_dying(req->q) ||
+ (nvme_req(req)->flags & NVME_REQ_CANCELLED))
return COMPLETE;
}
@@ -551,7 +552,7 @@ bool nvme_cancel_request(struct request *req, void
*data)
if (blk_mq_rq_state(req) != MQ_RQ_IN_FLIGHT)
return true;
- nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD;
+ nvme_req(req)->status = NVME_SC_HOST_ABORTED_CMD | NVME_STATUS_DNR;
nvme_req(req)->flags |= NVME_REQ_CANCELLED;
blk_mq_complete_request(req);
return true;
Bart.
prev parent reply other threads:[~2026-08-30 0:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 5:31 syzbot
2026-08-30 0:16 ` Bart Van Assche [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=2cf45e85-176a-4209-86ad-8f389a9a4282@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--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
all inboxes | Powered by JetHome®