BUG: sleeping function called from invalid context at kernel/printk/printk.c:2522 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 12940, name: syz-executor.5 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.5/12940: #0: ffff88806c5cd098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:252 #1: ffff88806c5cd468 (&tty->flow.lock){....}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:374 [inline] #1: ffff88806c5cd468 (&tty->flow.lock){....}-{2:2}, at: n_tty_ioctl_helper+0xb6/0x2d0 drivers/tty/tty_ioctl.c:877 #2: ffff88806c5cd098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:273 irq event stamp: 2050 hardirqs last enabled at (2049): [] kasan_quarantine_put+0xf5/0x210 mm/kasan/quarantine.c:220 hardirqs last disabled at (2050): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (2050): [] _raw_spin_lock_irq+0x41/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (1774): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (1774): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:636 softirqs last disabled at (1747): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (1747): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:636 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 12940 Comm: syz-executor.5 Not tainted 5.15.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __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:9539 console_lock+0x17/0x80 kernel/printk/printk.c:2522 do_con_write+0x10f/0x1e40 drivers/tty/vt/vt.c:2908 con_write+0x21/0x40 drivers/tty/vt/vt.c:3295 n_hdlc_send_frames+0x24b/0x490 drivers/tty/n_hdlc.c:290 tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:534 __start_tty drivers/tty/tty_io.c:806 [inline] __start_tty+0xfb/0x130 drivers/tty/tty_io.c:799 n_tty_ioctl_helper+0x299/0x2d0 drivers/tty/tty_ioctl.c:880 n_hdlc_tty_ioctl+0xd2/0x340 drivers/tty/n_hdlc.c:633 tty_ioctl+0xc69/0x1670 drivers/tty/tty_io.c:2814 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860 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+0x44/0xae RIP: 0033:0x7f5b590d9ae9 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5b5664f188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5b591ecf60 RCX: 00007f5b590d9ae9 RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005 RBP: 00007f5b59133f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffecda3025f R14: 00007f5b5664f300 R15: 0000000000022000