mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maurizio Lombardi" <mlombard@arkamax.eu>
To: "Maurizio Lombardi" <mlombard@arkamax.eu>,
	"syzbot" <syzbot+4a1d521d19d6321f5aad@syzkaller.appspotmail.com>,
	<hch@lst.de>, <kch@nvidia.com>, <linux-kernel@vger.kernel.org>,
	<linux-nvme@lists.infradead.org>, <sagi@grimberg.me>,
	<syzkaller-bugs@googlegroups.com>
Subject: Re: [syzbot] [nvme?] WARNING in nvme_loop_reset_ctrl_work
Date: Mon, 14 Sep 2026 12:16:53 +0200	[thread overview]
Message-ID: <DLEYMPA5WF42.2GHC28RDZX90E@arkamax.eu> (raw)
In-Reply-To: <DLEXGM8VZOW9.1J9A20FEP43RM@arkamax.eu>

On Mon Sep 14, 2026 at 11:21 AM CEST, Maurizio Lombardi wrote:
> On Sun Sep 13, 2026 at 5:34 PM CEST, syzbot wrote:
>> syzbot has found a reproducer for the following issue on:
>>
>> HEAD commit:    2f0c1cf72f46 Merge tag 's390-7.3-3' of git://git.kernel.or..
>> git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>> console output: https://syzkaller.appspot.com/x/log.txt?x=159b19f9580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=8c5c3949d762a91f
>> dashboard link: https://syzkaller.appspot.com/bug?extid=4a1d521d19d6321f5aad
>> compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
>> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1074f615580000
>
>
> It seems that a reset operation is enqueued before the controller
> initialization is completed.
>
> when the nvme_loop_reset_ctrl_work() finally runs, it will find the
> controller in LIVE state, thus hitting the WARN_ON().
>

Maybe moving the controller to CONNECTING state before exposing it to
sysfs will prevent the warning:

@@ -570,13 +575,13 @@ static struct nvme_ctrl *nvme_loop_create_ctrl(struct device *dev,
                goto out;
        }

+       if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING))
+                WARN_ON_ONCE(1);
+
        ret = nvme_add_ctrl(&ctrl->ctrl);
        if (ret)
                goto out_put_ctrl;

-       if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING))
-               WARN_ON_ONCE(1);
-
        ret = -ENOMEM;

        ctrl->ctrl.kato = opts->kato;

Maurizio


  reply	other threads:[~2026-09-14 10:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 15:16 syzbot
2026-09-13 15:34 ` syzbot
2026-09-14  9:21   ` Maurizio Lombardi
2026-09-14 10:16     ` Maurizio Lombardi [this message]
2026-09-14 15:20       ` Keith Busch
2026-09-14 15:25         ` Maurizio Lombardi

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=DLEYMPA5WF42.2GHC28RDZX90E@arkamax.eu \
    --to=mlombard@arkamax.eu \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=syzbot+4a1d521d19d6321f5aad@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®