BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 2200, name: kworker/1:3 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by kworker/1:3/2200: #0: ffff0000c0028948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x668/0x15d4 kernel/workqueue.c:3228 #1: ffff80009ceb7c20 ((work_completion)(&m->wq)){+.+.}-{0:0}, at: process_one_work+0x6b4/0x15d4 kernel/workqueue.c:3228 #2: ffff0000d3ce20a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340 #3: ffff0000d3ce2130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:954 [inline] #3: ffff0000d3ce2130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: iterate_tty_write drivers/tty/tty_io.c:973 [inline] #3: ffff0000d3ce2130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x188/0x7a4 drivers/tty/tty_io.c:1096 #4: ffff0000d7c803e0 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x60/0x154 drivers/tty/n_gsm.c:3721 irq event stamp: 34782 hardirqs last enabled at (34781): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (34781): [] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:194 hardirqs last disabled at (34782): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (34782): [] _raw_spin_lock_irqsave+0x2c/0x7c kernel/locking/spinlock.c:162 softirqs last enabled at (34730): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (34728): [] 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: 2200 Comm: kworker/1:3 Not tainted 6.9.0-rc4-syzkaller-g6a71d2909427 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events p9_write_work 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 __kernel_write_iter+0x348/0x748 fs/read_write.c:523 __kernel_write fs/read_write.c:543 [inline] kernel_write+0x2f8/0x520 fs/read_write.c:564 p9_fd_write net/9p/trans_fd.c:432 [inline] p9_write_work+0x45c/0xc1c net/9p/trans_fd.c:483 process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3416 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860