Linux driver-core infrastructure
 help / color / mirror / Atom feed
* [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
@ 2026-05-26  5:55 syzbot
  2026-05-26  6:08 ` Tetsuo Handa
  0 siblings, 1 reply; 6+ messages in thread
From: syzbot @ 2026-05-26  5:55 UTC (permalink / raw)
  To: dakr, driver-core, gregkh, linux-kernel, linux-next, rafael, sfr,
	syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com

------------[ cut here ]------------
class_for_each_device called for class 'devlink' before it was registered
WARNING: drivers/base/class.c:416 at class_for_each_device+0x2d8/0x390 drivers/base/class.c:415, CPU#1: kworker/1:1/37
Modules linked in:
CPU: 1 UID: 0 PID: 37 Comm: kworker/1:1 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: events deferred_probe_timeout_work_func
RIP: 0010:class_for_each_device+0x2fc/0x390 drivers/base/class.c:415
Code: 8d 1d 38 5c 0e 0a 4c 89 e8 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 ef e8 62 fc a5 fc 49 8b 55 00 48 89 df 48 c7 c6 f1 46 5d 8d <67> 48 0f b9 3a b8 ea ff ff ff eb 1b e8 93 79 3b fc 49 81 c6 90 00
RSP: 0000:ffffc90000ac7a20 EFLAGS: 00010246
RAX: 1ffffffff17865d4 RBX: ffffffff8f984790 RCX: ffff88801e2e9f00
RDX: ffffffff8bc34360 RSI: ffffffff8d5d46f1 RDI: ffffffff8f984790
RBP: ffffc90000ac7af8 R08: ffffc90000ac7a7f R09: 0000000000000000
R10: ffffc90000ac7a60 R11: fffff52000158f50 R12: ffffc90000ac7a60
R13: ffffffff8bc32ea0 R14: 1ffff92000158f48 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888125fdb000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000000ddb8000 CR4: 00000000003506f0
Call Trace:
 <TASK>
 fw_devlink_drivers_done+0x35/0x50 drivers/base/core.c:1837
 deferred_probe_timeout_work_func+0x21/0x220 drivers/base/dd.c:305
 process_one_work+0x98b/0x1630 kernel/workqueue.c:3318
 process_scheduled_works kernel/workqueue.c:3401 [inline]
 worker_thread+0xb49/0x1140 kernel/workqueue.c:3482
 kthread+0x388/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
----------------
Code disassembly (best guess):
   0:	8d 1d 38 5c 0e 0a    	lea    0xa0e5c38(%rip),%ebx        # 0xa0e5c3e
   6:	4c 89 e8             	mov    %r13,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1)
  12:	74 08                	je     0x1c
  14:	4c 89 ef             	mov    %r13,%rdi
  17:	e8 62 fc a5 fc       	call   0xfca5fc7e
  1c:	49 8b 55 00          	mov    0x0(%r13),%rdx
  20:	48 89 df             	mov    %rbx,%rdi
  23:	48 c7 c6 f1 46 5d 8d 	mov    $0xffffffff8d5d46f1,%rsi
* 2a:	67 48 0f b9 3a       	ud1    (%edx),%rdi <-- trapping instruction
  2f:	b8 ea ff ff ff       	mov    $0xffffffea,%eax
  34:	eb 1b                	jmp    0x51
  36:	e8 93 79 3b fc       	call   0xfc3b79ce
  3b:	49                   	rex.WB
  3c:	81                   	.byte 0x81
  3d:	c6                   	(bad)
  3e:	90                   	nop


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
  2026-05-26  5:55 [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device syzbot
@ 2026-05-26  6:08 ` Tetsuo Handa
  2026-05-26  7:19   ` Tetsuo Handa
  0 siblings, 1 reply; 6+ messages in thread
From: Tetsuo Handa @ 2026-05-26  6:08 UTC (permalink / raw)
  To: Zhang Yuwei
  Cc: syzbot, dakr, driver-core, gregkh, linux-kernel, linux-next,
	rafael, sfr, syzkaller-bugs

On 2026/05/26 14:55, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
> dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> class_for_each_device called for class 'devlink' before it was registered
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/base?id=1137838865bfc9a7cd5869c1dc5c22aa45ec12c8

Why "driver_deferred_probe_timeout * HZ" => "driver_deferred_probe_timeout" ?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
  2026-05-26  6:08 ` Tetsuo Handa
@ 2026-05-26  7:19   ` Tetsuo Handa
  2026-05-26 11:59     ` Tetsuo Handa
  2026-05-26 12:02     ` Danilo Krummrich
  0 siblings, 2 replies; 6+ messages in thread
From: Tetsuo Handa @ 2026-05-26  7:19 UTC (permalink / raw)
  To: Zhang Yuwei, gregkh
  Cc: syzbot, dakr, driver-core, linux-kernel, linux-next, rafael, sfr,
	syzkaller-bugs

On 2026/05/26 15:08, Tetsuo Handa wrote:
> On 2026/05/26 14:55, syzbot wrote:
>> Hello,
>>
>> syzbot found the following issue on:
>>
>> HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
>> git tree:       linux-next
>> console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
>> kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
>> dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
>> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>>
>> Downloadable assets:
>> disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
>> vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
>> kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz
>>
>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>> Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com
>>
>> ------------[ cut here ]------------
>> class_for_each_device called for class 'devlink' before it was registered
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/base?id=1137838865bfc9a7cd5869c1dc5c22aa45ec12c8
> 
> Why "driver_deferred_probe_timeout * HZ" => "driver_deferred_probe_timeout" ?
> 

Here is an analysis from Google AI mode regarding this problem: https://share.google/aimode/UO1WnoKPDSbyjY5Qj

Greg, can you immediately drop commit 1137838865bf ("driver core: Use mod_delayed_work to prevent
lost deferred probe work") so that syzbot can resume testing linux-next tree as soon as possible?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
  2026-05-26  7:19   ` Tetsuo Handa
@ 2026-05-26 11:59     ` Tetsuo Handa
  2026-05-26 12:03       ` Danilo Krummrich
  2026-05-26 12:02     ` Danilo Krummrich
  1 sibling, 1 reply; 6+ messages in thread
From: Tetsuo Handa @ 2026-05-26 11:59 UTC (permalink / raw)
  To: Zhang Yuwei, gregkh, Mark Brown
  Cc: syzbot, dakr, driver-core, linux-kernel, linux-next, rafael, sfr,
	syzkaller-bugs

On 2026/05/26 16:19, Tetsuo Handa wrote:
> On 2026/05/26 15:08, Tetsuo Handa wrote:
>> On 2026/05/26 14:55, syzbot wrote:
>>> Hello,
>>>
>>> syzbot found the following issue on:
>>>
>>> HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
>>> git tree:       linux-next
>>> console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
>>> dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
>>> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>>>
>>> Downloadable assets:
>>> disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
>>> vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
>>> kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz
>>>
>>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>>> Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com
>>>
>>> ------------[ cut here ]------------
>>> class_for_each_device called for class 'devlink' before it was registered
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/base?id=1137838865bfc9a7cd5869c1dc5c22aa45ec12c8
>>
>> Why "driver_deferred_probe_timeout * HZ" => "driver_deferred_probe_timeout" ?
>>
> 
> Here is an analysis from Google AI mode regarding this problem: https://share.google/aimode/UO1WnoKPDSbyjY5Qj
> 
> Greg, can you immediately drop commit 1137838865bf ("driver core: Use mod_delayed_work to prevent
> lost deferred probe work") so that syzbot can resume testing linux-next tree as soon as possible?
> 

Below diff was generated via conversation with AI Mode in Google Search, and
I agree that this diff should fix the problem. I'm waiting for Greg's response
on how to proceed. Mark, can you carry below diff as a hotfix for linux-next tree?

---
 drivers/base/dd.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 172a02a438a2..265717a19b08 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -298,10 +298,14 @@ int driver_deferred_probe_check_state(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(driver_deferred_probe_check_state);
 
+static int deferred_probe_timeout_triggered __data_racy;
 static void deferred_probe_timeout_work_func(struct work_struct *work)
 {
 	struct device_private *p;
 
+	if (cmpxchg(&deferred_probe_timeout_triggered, 0, 1))
+		return;
+
 	fw_devlink_drivers_done();
 
 	driver_deferred_probe_timeout = 0;
@@ -323,8 +327,9 @@ void deferred_probe_extend_timeout(void)
 	 * If the work hasn't been queued yet or if the work expired, don't
 	 * start a new one.
 	 */
-	if (mod_delayed_work(system_wq, &deferred_probe_timeout_work,
-						 driver_deferred_probe_timeout))
+	if (!deferred_probe_timeout_triggered &&
+	    mod_delayed_work(system_wq, &deferred_probe_timeout_work,
+					driver_deferred_probe_timeout * HZ))
 		pr_debug("Extended deferred probe timeout by %d secs\n",
 					driver_deferred_probe_timeout);
 }
@@ -357,10 +362,11 @@ static int deferred_probe_initcall(void)
 	driver_deferred_probe_trigger();
 	flush_work(&deferred_probe_work);
 
-	if (driver_deferred_probe_timeout > 0) {
+	if (driver_deferred_probe_timeout > 0)
 		schedule_delayed_work(&deferred_probe_timeout_work,
 			driver_deferred_probe_timeout * HZ);
-	}
+	else
+		deferred_probe_timeout_triggered = 1;
 
 	if (!IS_ENABLED(CONFIG_MODULES))
 		fw_devlink_probing_done();
-- 
2.54.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
  2026-05-26  7:19   ` Tetsuo Handa
  2026-05-26 11:59     ` Tetsuo Handa
@ 2026-05-26 12:02     ` Danilo Krummrich
  1 sibling, 0 replies; 6+ messages in thread
From: Danilo Krummrich @ 2026-05-26 12:02 UTC (permalink / raw)
  To: Tetsuo Handa
  Cc: Zhang Yuwei, gregkh, syzbot, driver-core, linux-kernel,
	linux-next, rafael, sfr, syzkaller-bugs

On Tue May 26, 2026 at 9:19 AM CEST, Tetsuo Handa wrote:
> On 2026/05/26 15:08, Tetsuo Handa wrote:
>> On 2026/05/26 14:55, syzbot wrote:
>>> Hello,
>>>
>>> syzbot found the following issue on:
>>>
>>> HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
>>> git tree:       linux-next
>>> console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
>>> dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
>>> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>>>
>>> Downloadable assets:
>>> disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
>>> vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
>>> kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz
>>>
>>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>>> Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com
>>>
>>> ------------[ cut here ]------------
>>> class_for_each_device called for class 'devlink' before it was registered
>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/base?id=1137838865bfc9a7cd5869c1dc5c22aa45ec12c8
>> 
>> Why "driver_deferred_probe_timeout * HZ" => "driver_deferred_probe_timeout" ?
>> 
>
> Here is an analysis from Google AI mode regarding this problem: https://share.google/aimode/UO1WnoKPDSbyjY5Qj
>
> Greg, can you immediately drop commit 1137838865bf ("driver core: Use mod_delayed_work to prevent
> lost deferred probe work") so that syzbot can resume testing linux-next tree as soon as possible?

I already posted patches to fix this in [1]. I will pick them up today.

[1] https://lore.kernel.org/driver-core/20260525012340.3860581-1-dakr@kernel.org/t/#u

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device
  2026-05-26 11:59     ` Tetsuo Handa
@ 2026-05-26 12:03       ` Danilo Krummrich
  0 siblings, 0 replies; 6+ messages in thread
From: Danilo Krummrich @ 2026-05-26 12:03 UTC (permalink / raw)
  To: Tetsuo Handa
  Cc: Zhang Yuwei, gregkh, Mark Brown, syzbot, driver-core,
	linux-kernel, linux-next, rafael, sfr, syzkaller-bugs

On Tue May 26, 2026 at 1:59 PM CEST, Tetsuo Handa wrote:
> On 2026/05/26 16:19, Tetsuo Handa wrote:
>> On 2026/05/26 15:08, Tetsuo Handa wrote:
>>> On 2026/05/26 14:55, syzbot wrote:
>>>> Hello,
>>>>
>>>> syzbot found the following issue on:
>>>>
>>>> HEAD commit:    d387b06f7c15 Add linux-next specific files for 20260525
>>>> git tree:       linux-next
>>>> console output: https://syzkaller.appspot.com/x/log.txt?x=15eb7796580000
>>>> kernel config:  https://syzkaller.appspot.com/x/.config?x=8dd72cf810e753a6
>>>> dashboard link: https://syzkaller.appspot.com/bug?extid=50b5f81fff158669504a
>>>> compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
>>>>
>>>> Downloadable assets:
>>>> disk image: https://storage.googleapis.com/syzbot-assets/39490dfbc250/disk-d387b06f.raw.xz
>>>> vmlinux: https://storage.googleapis.com/syzbot-assets/0789ac7ac5fc/vmlinux-d387b06f.xz
>>>> kernel image: https://storage.googleapis.com/syzbot-assets/4464df9f5ccf/bzImage-d387b06f.xz
>>>>
>>>> IMPORTANT: if you fix the issue, please add the following tag to the commit:
>>>> Reported-by: syzbot+50b5f81fff158669504a@syzkaller.appspotmail.com
>>>>
>>>> ------------[ cut here ]------------
>>>> class_for_each_device called for class 'devlink' before it was registered
>>> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/base?id=1137838865bfc9a7cd5869c1dc5c22aa45ec12c8
>>>
>>> Why "driver_deferred_probe_timeout * HZ" => "driver_deferred_probe_timeout" ?
>>>
>> 
>> Here is an analysis from Google AI mode regarding this problem: https://share.google/aimode/UO1WnoKPDSbyjY5Qj
>> 
>> Greg, can you immediately drop commit 1137838865bf ("driver core: Use mod_delayed_work to prevent
>> lost deferred probe work") so that syzbot can resume testing linux-next tree as soon as possible?
>> 
>
> Below diff was generated via conversation with AI Mode in Google Search, and
> I agree that this diff should fix the problem. I'm waiting for Greg's response
> on how to proceed. Mark, can you carry below diff as a hotfix for linux-next tree?

As mentioned in the previous reply, I already posted patches for this in [1];
will pick them up today.

[1] https://lore.kernel.org/driver-core/20260525012340.3860581-1-dakr@kernel.org/t/#u

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-26 12:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  5:55 [syzbot] [kernel?] linux-next test error: WARNING in class_for_each_device syzbot
2026-05-26  6:08 ` Tetsuo Handa
2026-05-26  7:19   ` Tetsuo Handa
2026-05-26 11:59     ` Tetsuo Handa
2026-05-26 12:03       ` Danilo Krummrich
2026-05-26 12:02     ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox