BUG: sleeping function called from invalid context at kernel/printk/printk.c:2623 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 4291, name: kworker/1:4 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 5 locks held by kworker/1:4/4291: #0: ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2265 #1: ffff80001e577c20 ((work_completion)(&m->wq)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2267 #2: ffff0000dd67c098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340 #3: ffff0000dd67c130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:944 [inline] #3: ffff0000dd67c130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:967 [inline] #3: ffff0000dd67c130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x18c/0x6f0 drivers/tty/tty_io.c:1089 #4: ffff0000d95f73e0 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x60/0x154 drivers/tty/n_gsm.c:3060 irq event stamp: 218578 hardirqs last enabled at (218577): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (218577): [] _raw_spin_unlock_irqrestore+0x48/0xac kernel/locking/spinlock.c:194 hardirqs last disabled at (218578): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (218578): [] _raw_spin_lock_irqsave+0xa4/0xb4 kernel/locking/spinlock.c:162 softirqs last enabled at (218566): [] addrconf_dad_completed+0x30c/0xb40 net/ipv6/addrconf.c:4253 softirqs last disabled at (218564): [] addrconf_dad_completed+0x194/0xb40 net/ipv6/addrconf.c:4246 Preemption disabled at: [] gsmld_write+0x60/0x154 drivers/tty/n_gsm.c:3060 CPU: 1 PID: 4291 Comm: kworker/1:4 Not tainted 6.1.91-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events p9_write_work Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __might_resched+0x37c/0x4d8 kernel/sched/core.c:9942 __might_sleep+0x90/0xe4 kernel/sched/core.c:9871 console_lock+0x38/0x238 kernel/printk/printk.c:2623 do_con_write+0x110/0x5a8c drivers/tty/vt/vt.c:2908 con_write+0x34/0x58 drivers/tty/vt/vt.c:3295 gsmld_write+0x104/0x154 drivers/tty/n_gsm.c:3063 do_tty_write drivers/tty/tty_io.c:1018 [inline] file_tty_write+0x404/0x6f0 drivers/tty/tty_io.c:1089 tty_write+0x48/0x58 drivers/tty/tty_io.c:1110 __kernel_write_iter+0x264/0x5f8 fs/read_write.c:517 __kernel_write fs/read_write.c:537 [inline] kernel_write+0x1b0/0x2f0 fs/read_write.c:558 p9_fd_write net/9p/trans_fd.c:434 [inline] p9_write_work+0x45c/0xc1c net/9p/trans_fd.c:485 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864