BUG: sleeping function called from invalid context at kernel/printk/printk.c:2555 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 4065, name: kworker/0:7 5 locks held by kworker/0:7/4065: #0: ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283 #1: ffff80001d4e7c00 ((work_completion)(&m->wq)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285 #2: ffff0000d2966098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340 #3: ffff0000d2966130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:961 [inline] #3: ffff0000d2966130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:984 [inline] #3: ffff0000d2966130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write+0x1d4/0x758 drivers/tty/tty_io.c:1110 #4: ffff0000e852c398 (&gsm->tx_lock){....}-{2:2}, at: gsmld_write+0x60/0x164 drivers/tty/n_gsm.c:2929 irq event stamp: 44548 hardirqs last enabled at (44547): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (44547): [] _raw_spin_unlock_irqrestore+0xac/0x158 kernel/locking/spinlock.c:194 hardirqs last disabled at (44548): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (44548): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (44476): [] spin_unlock_bh include/linux/spinlock.h:408 [inline] softirqs last enabled at (44476): [] ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline] softirqs last enabled at (44476): [] wg_packet_encrypt_worker+0x10f0/0x1180 drivers/net/wireguard/send.c:293 softirqs last disabled at (44474): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (44474): [] ptr_ring_consume_bh include/linux/ptr_ring.h:365 [inline] softirqs last disabled at (44474): [] wg_packet_encrypt_worker+0xe90/0x1180 drivers/net/wireguard/send.c:293 Preemption disabled at: [] gsmld_write+0x60/0x164 drivers/tty/n_gsm.c:2929 CPU: 0 PID: 4065 Comm: kworker/0:7 Not tainted 5.15.156-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+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __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_sleep+0x380/0x4dc kernel/sched/core.c:9626 __might_sleep+0x98/0xf0 kernel/sched/core.c:9580 console_lock+0x30/0x16c kernel/printk/printk.c:2555 do_con_write+0x110/0x5934 drivers/tty/vt/vt.c:2908 con_write+0x34/0x58 drivers/tty/vt/vt.c:3295 gsmld_write+0x108/0x164 drivers/tty/n_gsm.c:2932 do_tty_write drivers/tty/tty_io.c:1038 [inline] file_tty_write+0x44c/0x758 drivers/tty/tty_io.c:1110 tty_write+0x48/0x58 drivers/tty/tty_io.c:1131 __kernel_write+0x488/0x8b0 fs/read_write.c:539 kernel_write+0xe0/0x1ec fs/read_write.c:568 p9_fd_write net/9p/trans_fd.c:436 [inline] p9_write_work+0x488/0xcfc net/9p/trans_fd.c:487 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870