mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Test patch for devlink warning
       [not found] <CA+Q0x0e1dX=QyiNXp_7seHoMWRiw=KvqCNecHztj2Te6kRnYPw@mail.gmail.com>
@ 2026-05-31 11:05 ` syzbot
  0 siblings, 0 replies; only message in thread
From: syzbot @ 2026-05-31 11:05 UTC (permalink / raw)
  To: kbreddy.rpbc; +Cc: kbreddy.rpbc, linux-kernel, syzkaller-bugs

> #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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-31 11:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+Q0x0e1dX=QyiNXp_7seHoMWRiw=KvqCNecHztj2Te6kRnYPw@mail.gmail.com>
2026-05-31 11:05 ` Test patch for devlink warning syzbot

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®