BUG: sleeping function called from invalid context at kernel/printk/printk.c:2460 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 8449, name: syz-executor236 3 locks held by syz-executor236/8449: #0: ffff8880202f4098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:267 #1: ffff8880202f43f8 (&tty->flow_lock){....}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:379 [inline] #1: ffff8880202f43f8 (&tty->flow_lock){....}-{2:2}, at: n_tty_ioctl_helper+0xcc/0x3a0 drivers/tty/tty_ioctl.c:857 #2: ffff8880202f4098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:288 irq event stamp: 1246 hardirqs last enabled at (1245): [] kasan_quarantine_put+0xf5/0x210 mm/kasan/quarantine.c:220 hardirqs last disabled at (1246): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (1246): [] _raw_spin_lock_irq+0x41/0x50 kernel/locking/spinlock.c:167 softirqs last enabled at (1098): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last enabled at (1098): [] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 softirqs last disabled at (1043): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last disabled at (1043): [] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 8449 Comm: syz-executor236 Not tainted 5.13.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:8338 console_lock+0x19/0x80 kernel/printk/printk.c:2460 do_con_write+0x10f/0x1e60 drivers/tty/vt/vt.c:2868 con_write+0x21/0x40 drivers/tty/vt/vt.c:3255 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:822 [inline] __start_tty+0x116/0x150 drivers/tty/tty_io.c:815 n_tty_ioctl_helper+0x348/0x3a0 drivers/tty/tty_ioctl.c:860 n_hdlc_tty_ioctl+0xe4/0x360 drivers/tty/n_hdlc.c:631 tty_ioctl+0xef9/0x1600 drivers/tty/tty_io.c:2814 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl fs/ioctl.c:1055 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x440009 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:00007ffd44ab52f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 0000000000440009 RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000005 RBP: 0000000000000000 R08: 000000000000000d R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000403550 R13: 0000000000000000 R14: 00007ffd44ab5320 R15: 00007ffd44ab5310