BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 5966, name: syz-executor.3 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.3/5966: #0: ffff88802bb0f0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243 #1: ffff88802bb0f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline] #1: ffff88802bb0f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline] #1: ffff88802bb0f130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x293/0x9b0 drivers/tty/tty_io.c:1096 #2: ffff8880288463e0 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x62/0x150 drivers/tty/n_gsm.c:3721 irq event stamp: 2860 hardirqs last enabled at (2859): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (2859): [] _raw_spin_unlock_irqrestore+0x52/0x80 kernel/locking/spinlock.c:194 hardirqs last disabled at (2860): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (2860): [] _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:162 softirqs last enabled at (2744): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (2744): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (2709): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (2709): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2709): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (2709): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 2 PID: 5966 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-09699-geb6a9339efeb #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 __might_resched+0x3c0/0x5e0 kernel/sched/core.c:10196 console_lock+0x1b/0xa0 kernel/printk/printk.c:2659 do_con_write+0x154/0x7d00 drivers/tty/vt/vt.c:3056 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3434 gsmld_write+0xd2/0x150 drivers/tty/n_gsm.c:3724 iterate_tty_write drivers/tty/tty_io.c:1021 [inline] file_tty_write.constprop.0+0x518/0x9b0 drivers/tty/tty_io.c:1096 call_write_iter include/linux/fs.h:2120 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x6b6/0x1120 fs/read_write.c:590 ksys_write+0x12f/0x260 fs/read_write.c:643 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf72ff579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5ef15ac EFLAGS: 00000292 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 0000000020000bc0 RDX: 00000000000004b0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi