BUG: sleeping function called from invalid context at kernel/printk/printk.c:2598 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 6585, name: syz-executor.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x21e7/0x7400 kernel/fork.c:2449 softirqs last enabled at (0): [] copy_process+0x2228/0x7400 kernel/fork.c:2453 softirqs last disabled at (0): [<0000000000000000>] 0x0 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 6585 Comm: syz-executor.0 Not tainted 6.5.0-syzkaller-09276-g99d99825fc07 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 __might_resched+0x3c3/0x5e0 kernel/sched/core.c:10187 console_lock+0x1b/0x80 kernel/printk/printk.c:2598 do_con_write+0x136/0x7f50 drivers/tty/vt/vt.c:2863 con_write+0x24/0x40 drivers/tty/vt/vt.c:3246 gsmld_write+0xcf/0x140 drivers/tty/n_gsm.c:3675 do_tty_write drivers/tty/tty_io.c:1027 [inline] file_tty_write.constprop.0+0x519/0x980 drivers/tty/tty_io.c:1098 call_write_iter include/linux/fs.h:1985 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x650/0xe40 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcb50c7cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcb4f7fe0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fcb50d9c050 RCX: 00007fcb50c7cae9 RDX: 0000000000000035 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007fcb50cc847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fcb50d9c050 R15: 00007fcb50ebfa48 BUG: scheduling while atomic: syz-executor.0/6585/0x00000002 INFO: lockdep is turned off. Modules linked in: Preemption disabled at: [<0000000000000000>] 0x0