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: 6354 Comm: syz-executor.0 Not tainted 6.0.0-rc1-next-20220819-syzkaller #0 BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1521 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 6354, name: syz-executor.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 1446 hardirqs last enabled at (1445): [] syscall_enter_from_user_mode+0x22/0xb0 kernel/entry/common.c:109 hardirqs last disabled at (1446): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1446): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (1422): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (1422): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 softirqs last disabled at (1281): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (1281): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 6354 Comm: syz-executor.0 Not tainted 6.0.0-rc1-next-20220819-syzkaller #0 syz-executor.0[6354] cmdline: /root/syz-executor.0 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9896 down_read_killable+0x75/0x490 kernel/locking/rwsem.c:1521 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 get_mm_cmdline.part.0+0x217/0x620 fs/proc/base.c:299 get_mm_cmdline fs/proc/base.c:367 [inline] get_task_cmdline_kernel+0x1d9/0x220 fs/proc/base.c:367 dump_stack_print_cmdline.part.0+0x82/0x150 lib/dump_stack.c:61 dump_stack_print_cmdline lib/dump_stack.c:89 [inline] dump_stack_print_info+0x185/0x190 lib/dump_stack.c:97 __dump_stack lib/dump_stack.c:121 [inline] dump_stack_lvl+0xc1/0x134 lib/dump_stack.c:140 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:2188 [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:0x7f48c5289279 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:00007f48c642e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f48c539bf80 RCX: 00007f48c5289279 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f48c52e3189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff51b9587f R14: 00007f48c642e300 R15: 0000000000022000 syz-executor.0[6354] cmdline: /root/syz-executor.0 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 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:2188 [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:0x7f48c5289279 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:00007f48c642e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f48c539bf80 RCX: 00007f48c5289279 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f48c52e3189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff51b9587f R14: 00007f48c642e300 R15: 0000000000022000