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: 1 PID: 17684 Comm: syz-executor.3 Not tainted 6.0.0-rc3-syzkaller-00215-g0b3acd1cc022 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 assign_lock_key+0x22a/0x240 kernel/locking/lockdep.c:979 register_lock_class+0x287/0x9b0 kernel/locking/lockdep.c:1292 __lock_acquire+0xe4/0x1f60 kernel/locking/lockdep.c:4932 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5666 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 gsmld_write+0x5b/0x120 drivers/tty/n_gsm.c:3023 do_tty_write drivers/tty/tty_io.c:1024 [inline] file_tty_write+0x5a5/0x960 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+0x7b5/0xbb0 fs/read_write.c:578 ksys_write+0x19b/0x2c0 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f20f2e89279 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f20f3fad168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f20f2f9bf80 RCX: 00007f20f2e89279 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f20f2ee32e9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc37ccd24f R14: 00007f20f3fad300 R15: 0000000000022000 BUG: sleeping function called from invalid context at kernel/printk/printk.c:2566 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 17684, name: syz-executor.3 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 610 hardirqs last enabled at (609): [] syscall_enter_from_user_mode+0x2e/0x1d0 kernel/entry/common.c:109 hardirqs last disabled at (610): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (610): [] _raw_spin_lock_irqsave+0xac/0x120 kernel/locking/spinlock.c:162 softirqs last enabled at (170): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 softirqs last disabled at (155): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 17684 Comm: syz-executor.3 Not tainted 6.0.0-rc3-syzkaller-00215-g0b3acd1cc022 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 __might_resched+0x538/0x6a0 kernel/sched/core.c:9892 console_lock+0x16/0x70 kernel/printk/printk.c:2566 do_con_write+0x113/0x77b0 drivers/tty/vt/vt.c:2908 con_write+0x28/0x640 drivers/tty/vt/vt.c:3295 gsmld_write+0xf9/0x120 drivers/tty/n_gsm.c:3026 do_tty_write drivers/tty/tty_io.c:1024 [inline] file_tty_write+0x5a5/0x960 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+0x7b5/0xbb0 fs/read_write.c:578 ksys_write+0x19b/0x2c0 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f20f2e89279 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f20f3fad168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f20f2f9bf80 RCX: 00007f20f2e89279 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f20f2ee32e9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc37ccd24f R14: 00007f20f3fad300 R15: 0000000000022000