syzbot


INFO: trying to register non-static key in devres_for_each_res

Status: auto-closed as invalid on 2020/09/07 23:32
Reported-by: syzbot+68aad81f48e15b0e8ff2@syzkaller.appspotmail.com
First crash: 779d, last: 779d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: trying to register non-static key in devres_for_each_res 1 168d 168d 0/1 auto-closed as invalid on 2022/05/11 23:24

Sample crash report:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 1 PID: 8374 Comm: syz-executor.3 Not tainted 4.14.180-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x13e/0x194 lib/dump_stack.c:58
 register_lock_class+0x2fe/0x1600 kernel/locking/lockdep.c:768
 __lock_acquire+0x147/0x4620 kernel/locking/lockdep.c:3378
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:160
 devres_for_each_res drivers/base/devres.c:182 [inline]
 devres_for_each_res+0x51/0x1a0 drivers/base/devres.c:170
 dev_cache_fw_image+0x8c/0x390 drivers/base/firmware_class.c:1610
 dpm_for_each_dev drivers/base/power/main.c:1878 [inline]
 dpm_for_each_dev+0x56/0xb0 drivers/base/power/main.c:1869
 device_cache_fw_images drivers/base/firmware_class.c:1688 [inline]
 fw_pm_notify+0xcb/0x110 drivers/base/firmware_class.c:1739
 notifier_call_chain+0x107/0x1a0 kernel/notifier.c:93
 __blocking_notifier_call_chain kernel/notifier.c:317 [inline]
 __blocking_notifier_call_chain+0x8f/0xb0 kernel/notifier.c:304
 __pm_notifier_call_chain+0x2c/0x60 kernel/power/main.c:45
 snapshot_open+0x206/0x3f0 kernel/power/user.c:77
 misc_open+0x337/0x460 drivers/char/misc.c:154
 chrdev_open+0x1fc/0x540 fs/char_dev.c:423
 do_dentry_open+0x732/0xe90 fs/open.c:777
 vfs_open+0x105/0x220 fs/open.c:888
 do_last fs/namei.c:3428 [inline]
 path_openat+0x8ca/0x3c50 fs/namei.c:3569
 do_filp_open+0x18e/0x250 fs/namei.c:3603
 do_sys_open+0x29d/0x3f0 fs/open.c:1081
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c829
RSP: 002b:00007f7ba1385c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00000000004f8760 RCX: 000000000045c829
RDX: 0000000000000400 RSI: 0000000020000100 RDI: ffffffffffffff9c
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000007ee R14: 00000000004caa99 R15: 00007f7ba13866d4
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 8374 Comm: syz-executor.3 Not tainted 4.14.180-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a0262400 task.stack: ffff88820c968000
RIP: 0010:devres_for_each_res drivers/base/devres.c:183 [inline]
RIP: 0010:devres_for_each_res+0x94/0x1a0 drivers/base/devres.c:170
RSP: 0018:ffff88820c96f788 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: ffffffff83993440 RCX: ffffc9000886b000
RDX: 0000000000000001 RSI: ffffffff82fb2c3a RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: fffffbfff14a94cd R11: ffff8880a0262400 R12: 0000000000000000
R13: ffff8880001592a0 R14: ffffffff83992810 R15: ffffffff8afab698
FS:  00007f7ba1386700(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c423b4e004 CR3: 00000000a0d77000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 dev_cache_fw_image+0x8c/0x390 drivers/base/firmware_class.c:1610
 dpm_for_each_dev drivers/base/power/main.c:1878 [inline]
 dpm_for_each_dev+0x56/0xb0 drivers/base/power/main.c:1869
 device_cache_fw_images drivers/base/firmware_class.c:1688 [inline]
 fw_pm_notify+0xcb/0x110 drivers/base/firmware_class.c:1739
 notifier_call_chain+0x107/0x1a0 kernel/notifier.c:93
 __blocking_notifier_call_chain kernel/notifier.c:317 [inline]
 __blocking_notifier_call_chain+0x8f/0xb0 kernel/notifier.c:304
 __pm_notifier_call_chain+0x2c/0x60 kernel/power/main.c:45
 snapshot_open+0x206/0x3f0 kernel/power/user.c:77
 misc_open+0x337/0x460 drivers/char/misc.c:154
 chrdev_open+0x1fc/0x540 fs/char_dev.c:423
 do_dentry_open+0x732/0xe90 fs/open.c:777
 vfs_open+0x105/0x220 fs/open.c:888
 do_last fs/namei.c:3428 [inline]
 path_openat+0x8ca/0x3c50 fs/namei.c:3569
 do_filp_open+0x18e/0x250 fs/namei.c:3603
 do_sys_open+0x29d/0x3f0 fs/open.c:1081
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c829
RSP: 002b:00007f7ba1385c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00000000004f8760 RCX: 000000000045c829
RDX: 0000000000000400 RSI: 0000000020000100 RDI: ffffffffffffff9c
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000007ee R14: 00000000004caa99 R15: 00007f7ba13866d4
Code: df 48 c1 ea 03 80 3c 02 00 0f 85 14 01 00 00 49 8b ad e8 03 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7d 08 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e4 00 00 00 4d 8d bd e0 03 00 00 48 8b 5d 08 
RIP: devres_for_each_res drivers/base/devres.c:183 [inline] RSP: ffff88820c96f788
RIP: devres_for_each_res+0x94/0x1a0 drivers/base/devres.c:170 RSP: ffff88820c96f788
---[ end trace 0e3a8576a2fed72b ]---

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2020/05/10 23:31 linux-4.14.y ab9dfda23248 8742a2b9 .config log report