BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 6722, name: syz-executor.1 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.1/6722: #0: ffff0000c26e90a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340 #1: ffff0000c26e9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline] #1: ffff0000c26e9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline] #1: ffff0000c26e9130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x188/0x7a4 drivers/tty/tty_io.c:1096 #2: ffff0000ed5e43e0 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x60/0x154 drivers/tty/n_gsm.c:3721 irq event stamp: 15266 hardirqs last enabled at (15265): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (15265): [] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:194 hardirqs last disabled at (15266): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (15266): [] _raw_spin_lock_irqsave+0x2c/0x7c kernel/locking/spinlock.c:162 softirqs last enabled at (15258): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (15256): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 Preemption disabled at: [] gsmld_write+0x60/0x154 drivers/tty/n_gsm.c:3721 CPU: 1 PID: 6722 Comm: syz-executor.1 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 __might_resched+0x374/0x4d0 kernel/sched/core.c:10197 __might_sleep+0x90/0xe4 kernel/sched/core.c:10126 console_lock+0x38/0x204 kernel/printk/printk.c:2659 do_con_write+0x130/0x3d28 drivers/tty/vt/vt.c:3056 con_write+0x34/0x58 drivers/tty/vt/vt.c:3434 gsmld_write+0x104/0x154 drivers/tty/n_gsm.c:3724 iterate_tty_write drivers/tty/tty_io.c:1021 [inline] file_tty_write+0x410/0x7a4 drivers/tty/tty_io.c:1096 tty_write+0x48/0x58 drivers/tty/tty_io.c:1117 call_write_iter include/linux/fs.h:2110 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x968/0xc3c fs/read_write.c:590 ksys_write+0x15c/0x26c fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:652 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:133 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598