syzbot


INFO: trying to register non-static key in gsmld_write

Status: upstream: reported C repro on 2022/08/08 07:34
Reported-by: syzbot+cf155def4e717db68a12@syzkaller.appspotmail.com
Fix commit: 4bb1a53be85f tty: n_gsm: initialize more members at gsm_alloc_mux()
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce]
First crash: 52d, last: 23d

Cause bisection: failed (bisect log)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
INFO: trying to register non-static key in __access_remote_vm C inconclusive 8 38d 36d 0/24 closed as dup on 2022/08/29 15:36
Patch testing requests:
Created Duration User Patch Repo Result
2022/08/27 13:26 15m penguin-kernel@i-love.sakura.ne.jp patch upstream OK log
2022/08/10 11:18 15m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git ca688bff68bc OK log

Sample crash report:
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 3622 Comm: syz-executor180 Not tainted 6.0.0-rc3-syzkaller-00007-gdcf8e5633e2e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 assign_lock_key kernel/locking/lockdep.c:979 [inline]
 register_lock_class+0xf1b/0x1120 kernel/locking/lockdep.c:1292
 __lock_acquire+0x109/0x56d0 kernel/locking/lockdep.c:4932
 lock_acquire kernel/locking/lockdep.c:5666 [inline]
 lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
 gsmld_write+0x5e/0x140 drivers/tty/n_gsm.c:3023
 do_tty_write drivers/tty/tty_io.c:1024 [inline]
 file_tty_write.constprop.0+0x499/0x8f0 drivers/tty/tty_io.c:1095
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x9e9/0xdd0 fs/read_write.c:578
 ksys_write+0x127/0x250 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8cfccd60c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdcf53b3e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f8cfccd60c9
RDX: 0000000000000040 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8cfcc99610
R13: 0000000000000000 R14: 00007ffdcf53b410 R15: 00007ffdcf53b400
 </TASK>
BUG: sleeping function called from invalid context at kernel/printk/printk.c:2566
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 3622, name: syz-executor180
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
irq event stamp: 756
hardirqs last  enabled at (755): [<ffffffff8982927f>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
hardirqs last  enabled at (755): [<ffffffff8982927f>] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202
hardirqs last disabled at (756): [<ffffffff898290ae>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline]
hardirqs last disabled at (756): [<ffffffff898290ae>] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162
softirqs last  enabled at (0): [<ffffffff8146f02e>] copy_process+0x213e/0x7090 kernel/fork.c:2201
softirqs last disabled at (0): [<0000000000000000>] 0x0
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 0 PID: 3622 Comm: syz-executor180 Not tainted 6.0.0-rc3-syzkaller-00007-gdcf8e5633e2e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9892
 console_lock+0x17/0x80 kernel/printk/printk.c:2566
 do_con_write+0x10f/0x1e40 drivers/tty/vt/vt.c:2908
 con_write+0x21/0x40 drivers/tty/vt/vt.c:3295
 gsmld_write+0xcb/0x140 drivers/tty/n_gsm.c:3026
 do_tty_write drivers/tty/tty_io.c:1024 [inline]
 file_tty_write.constprop.0+0x499/0x8f0 drivers/tty/tty_io.c:1095
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x9e9/0xdd0 fs/read_write.c:578
 ksys_write+0x127/0x250 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f8cfccd60c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdcf53b3e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007f8cfccd60c9
RDX: 0000000000000040 RSI: 0000000020000140 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8cfcc99610
R13: 0000000000000000 R14: 00007ffdcf53b410 R15: 00007ffdcf53b400
 </TASK>

Crashes (803):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/08/30 23:29 upstream dcf8e5633e2e 4a380809 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-root 2022/08/27 09:31 upstream 3e5c673f0d75 07177916 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce 2022/08/27 04:19 upstream 3e5c673f0d75 07177916 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce 2022/08/21 14:39 upstream 15b3f48a4339 26a13b38 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-root 2022/08/21 09:27 upstream 15b3f48a4339 26a13b38 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-linux-next-kasan-gce-root 2022/08/08 13:20 linux-next ca688bff68bc 88e3a122 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/28 20:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 07177916 .config log report syz C INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce 2022/09/04 04:23 upstream d895ec7938c4 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-smack-root 2022/09/03 12:59 upstream d895ec7938c4 49e94a20 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-smack-root 2022/09/02 21:20 upstream 0b3acd1cc022 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-smack-root 2022/09/02 18:36 upstream 42e66b1cc3a0 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce 2022/09/02 17:10 upstream 42e66b1cc3a0 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-root 2022/09/02 05:42 upstream 42e66b1cc3a0 a805568e .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-smack-root 2022/09/02 04:38 upstream 42e66b1cc3a0 a805568e .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-root 2022/09/01 16:47 upstream c5e4d5e99162 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-root 2022/09/01 15:10 upstream c5e4d5e99162 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-smack-root 2022/09/01 05:51 upstream c5e4d5e99162 b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-selinux-root 2022/08/30 22:00 upstream dcf8e5633e2e 4a380809 .config log report info INFO: trying to register non-static key in gsmld_write
ci-qemu-upstream 2022/08/22 03:35 upstream e3f259d33c0e 26a13b38 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/03 00:51 upstream 0b3acd1cc022 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/02 23:01 upstream 0b3acd1cc022 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/02 13:57 upstream 42e66b1cc3a0 25194605 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/02 03:12 upstream 42e66b1cc3a0 a805568e .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/01 20:46 upstream 2880e1a175b9 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/01 19:05 upstream 2880e1a175b9 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/01 10:40 upstream c5e4d5e99162 b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/01 03:15 upstream c5e4d5e99162 b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/09/01 00:47 upstream c5e4d5e99162 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/08/31 20:03 upstream c5e4d5e99162 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-kasan-gce-386 2022/08/31 14:24 upstream dcf8e5633e2e 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-qemu-upstream-386 2022/08/23 15:24 upstream 072e51356cd5 cea8b0f7 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-linux-next-kasan-gce-root 2022/08/16 01:26 linux-next 6c8f479764eb 8dfcaa3d .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-linux-next-kasan-gce-root 2022/08/08 07:10 linux-next ca688bff68bc 88e3a122 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-linux-next-kasan-gce-root 2022/08/08 05:07 linux-next ca688bff68bc 88e3a122 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/06 05:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 9dcd38fc .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/06 02:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 9dcd38fc .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/05 22:16 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 9dcd38fc .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/05 15:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 922294ab .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/05 11:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 922294ab .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/05 09:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 922294ab .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/04 19:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/04 14:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/04 06:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/04 01:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/03 20:06 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/03 15:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 28811d0a .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/03 01:56 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 49e94a20 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/02 01:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e a805568e .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 23:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 14:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 86c46e46 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 12:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 09:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 06:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/09/01 02:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d b01ec571 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 22:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 18:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 15:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 12:50 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 10:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 10:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 51e54e30 .config log report info INFO: trying to register non-static key in gsmld_write
ci-upstream-gce-arm64 2022/08/31 09:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 4a380809 .config log report info INFO: trying to register non-static key in gsmld_write
* Struck through repros no longer work on HEAD.