mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: syzbot <syzbot+fcc47ba2476570cbbeb0@syzkaller.appspotmail.com>,
	axboe@kernel.dk, bvanassche@acm.org, chaitanyak@nvidia.com,
	eadavis@qq.com, hch@infradead.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, ming.lei@redhat.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [block?] WARNING in blk_mq_start_request
Date: Thu, 9 Nov 2023 09:27:45 +0800	[thread overview]
Message-ID: <7ed9f6f9-d309-4d30-9b3b-c465cfa48a52@bytedance.com> (raw)
In-Reply-To: <00000000000077ca930609aa9f86@google.com>

On 2023/11/9 05:18, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit d78bfa1346ab1fe04d20aa45a0678d1fc866f37c
> Author: Chengming Zhou <zhouchengming@bytedance.com>
> Date:   Wed Sep 13 15:16:16 2023 +0000
> 
>     block/null_blk: add queue_rqs() support
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=106414a8e80000
> start commit:   13d88ac54ddd Merge tag 'vfs-6.7.fsid' of git://git.kernel...
> git tree:       upstream
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=126414a8e80000
> console output: https://syzkaller.appspot.com/x/log.txt?x=146414a8e80000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=beb32a598fd79db9
> dashboard link: https://syzkaller.appspot.com/bug?extid=fcc47ba2476570cbbeb0
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1465bb08e80000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13e7881f680000
> 
> Reported-by: syzbot+fcc47ba2476570cbbeb0@syzkaller.appspotmail.com
> Fixes: d78bfa1346ab ("block/null_blk: add queue_rqs() support")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION is enabled in the kernel config,
so null_queue_rq() will return BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE
for some requests, which have been marked as IN_FLIGHT status.

Then null_queue_rqs() put these requests in the rqlist and return back,
blk-mq will try to queue them individually once again, caused the warning
"WARN_ON_ONCE(blk_mq_rq_state(rq) != MQ_RQ_IDLE)" in blk_mq_start_request().

So handling of return value of null_queue_rq() in null_queue_rqs() is wrong,
maybe we should __blk_mq_requeue_request() for these requests, before
adding them in the rqlist?

Thanks!

  reply	other threads:[~2023-11-09  1:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_C325838DE11216DD9C5DAA192E4FCA0DD207@qq.com>
2023-11-08  0:52 ` syzbot
2023-11-08  1:35   ` [syzbot] [PATCH] Test for 4652b8e4f3ff syzbot
2023-11-08  6:25   ` syzbot
2023-11-08 21:18   ` [syzbot] [block?] WARNING in blk_mq_start_request syzbot
2023-11-09  1:27     ` Chengming Zhou [this message]
2023-11-09 18:13       ` Bart Van Assche
2023-11-13 15:05         ` [External] " Chengming Zhou
2023-11-13 23:57           ` Bart Van Assche
2023-11-14 15:05             ` Chengming Zhou
     [not found] <tencent_E23E9622360A4AE4747176DF66203CBD3609@qq.com>
2023-11-08  6:46 ` syzbot
     [not found] <tencent_D46F8895D0EB56EF92CC4078B66CE02DC50A@qq.com>
2023-11-08  2:09 ` syzbot
2023-11-07  7:29 syzbot

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=7ed9f6f9-d309-4d30-9b3b-c465cfa48a52@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=chaitanyak@nvidia.com \
    --cc=eadavis@qq.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=syzbot+fcc47ba2476570cbbeb0@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®