mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: syzbot <syzbot+c750936fbcad82cf6da9@syzkaller.appspotmail.com>
To: kbreddy.rpbc@gmail.com
Cc: kbreddy.rpbc@gmail.com, linux-kernel@vger.kernel.org,
	 syzkaller-bugs@googlegroups.com
Subject: Re: Test patch for devlink warning
Date: Sun, 31 May 2026 04:05:01 -0700	[thread overview]
Message-ID: <6a1c15dd.323e8352.141b09.0006.GAE@google.com> (raw)
In-Reply-To: <CA+Q0x0e1dX=QyiNXp_7seHoMWRiw=KvqCNecHztj2Te6kRnYPw@mail.gmail.com>

> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

This crash does not have a reproducer. I cannot test it.

> e7e28506af98
>
> From e997d178d3a8d58d3d5fe9e837f2814bd2252e58 Mon Sep 17 00:00:00 2001
> From: Bharath Reddy <kbreddy.rpbc@gmail.com>
> Date: Sun, 31 May 2026 16:16:30 +0530
> Subject: [PATCH] driver core: Fix unregistered class iterations in fw_devlink
>
> Add a check to verify devlink_class is registered before iterating over
> its devices in both fw_devlink_drivers_done() and fw_devlink_probing_done().
>
> This prevents a warning caused by deferred probing timeouts firing before
> the class is fully initialized, and proactively protects the late initcall
> probing path against class registration failures.
>
> Reported-by: syzbot+c750936fbcad82cf6da9@syzkaller.appspotmail.com
>
> Signed-off-by: Bharath Reddy <kbreddy.rpbc@gmail.com>
> ---
>  drivers/base/core.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 4d026682944f..7c7dfecc7a2b 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1834,8 +1834,10 @@ void fw_devlink_drivers_done(void)
>  {
>   fw_devlink_drv_reg_done = true;
>   device_links_write_lock();
> - class_for_each_device(&devlink_class, NULL, NULL,
> -       fw_devlink_no_driver);
> + if (class_is_registered(&devlink_class)) {
> + class_for_each_device(&devlink_class, NULL, NULL,
> +       fw_devlink_no_driver);
> + }
>   device_links_write_unlock();
>  }
>
> @@ -1871,8 +1873,10 @@ void fw_devlink_probing_done(void)
>   LIST_HEAD(sync_list);
>
>   device_links_write_lock();
> - class_for_each_device(&devlink_class, NULL, &sync_list,
> -       fw_devlink_dev_sync_state);
> + if (class_is_registered(&devlink_class)) {
> + class_for_each_device(&devlink_class, NULL, &sync_list,
> +       fw_devlink_dev_sync_state);
> + }
>   device_links_write_unlock();
>   device_links_flush_sync_list(&sync_list, NULL);
>  }
> --
> 2.34.1

           reply	other threads:[~2026-05-31 11:05 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <CA+Q0x0e1dX=QyiNXp_7seHoMWRiw=KvqCNecHztj2Te6kRnYPw@mail.gmail.com>]

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=6a1c15dd.323e8352.141b09.0006.GAE@google.com \
    --to=syzbot+c750936fbcad82cf6da9@syzkaller.appspotmail.com \
    --cc=kbreddy.rpbc@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®