BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1385 in_atomic(): 0, irqs_disabled(): 1, pid: 18731, name: syz-executor.4 6 locks held by syz-executor.4/18731: #0: (&tty->ldisc_sem){++++}, at: [] tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:284 #1: (&tty->atomic_write_lock){+.+.}, at: [] tty_write_lock drivers/tty/tty_io.c:888 [inline] #1: (&tty->atomic_write_lock){+.+.}, at: [] do_tty_write drivers/tty/tty_io.c:908 [inline] #1: (&tty->atomic_write_lock){+.+.}, at: [] tty_write+0x254/0x740 drivers/tty/tty_io.c:1043 #2: (&tty->termios_rwsem){++++}, at: [] n_tty_write+0x18a/0xda0 drivers/tty/n_tty.c:2316 #3: (&ldata->output_lock){+.+.}, at: [] process_output_block drivers/tty/n_tty.c:550 [inline] #3: (&ldata->output_lock){+.+.}, at: [] n_tty_write+0x43f/0xda0 drivers/tty/n_tty.c:2333 #4: (console_lock){+.+.}, at: [] do_con_write+0xd5/0x19b0 drivers/tty/vt/vt.c:2229 #5: (&mm->mmap_sem){++++}, at: [] __do_page_fault+0x2fa/0xb50 arch/x86/mm/fault.c:1371 irq event stamp: 5876 hardirqs last enabled at (5875): [] restore_regs_and_return_to_kernel+0x0/0x2a hardirqs last disabled at (5876): [] apic_timer_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:793 softirqs last enabled at (5862): [] __do_softirq+0x6ab/0xa1d kernel/softirq.c:314 softirqs last disabled at (5815): [] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (5815): [] irq_exit+0x193/0x240 kernel/softirq.c:409 CPU: 0 PID: 18731 Comm: syz-executor.4 Not tainted 4.14.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6042 __do_page_fault+0x31d/0xb50 arch/x86/mm/fault.c:1385 BUG: unable to handle kernel NULL pointer dereference at 0000000000000052 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 IP: trace_hardirqs_on_thunk+0x4/0x1c RIP: 0010:trace_hardirqs_on_thunk+0x11/0x1c PGD 91b88067 RSP: 0018:ffff88804476f0e0 EFLAGS: 00010006 P4D 91b88067 PUD a8dd6067 RAX: ffff88804476f118 RBX: 0000000000000000 RCX: 1ffffffff0f3a3ac PMD 0 RDX: 0000000000000000 RSI: ffffffff83058495 RDI: ffff88808f24cd54 RBP: 0000000000000000 R08: ffff88821fff7018 R09: ffff88821fff700f Oops: 0002 [#1] PREEMPT SMP KASAN R10: ffff88821fff7017 R11: 00000046571118ab R12: 0000000000000000 Modules linked in: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 CPU: 1 PID: 18739 Comm: syz-executor.3 Not tainted 4.14.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff888044ae6140 task.stack: ffff888053338000 RIP: 0010:trace_hardirqs_on_thunk+0x4/0x1c RSP: 0000:ffff88805333ff50 EFLAGS: 00010882 RAX: ffff888044ae6140 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888044ae6148 RBP: 0000000000000000 R08: ffffffff8a080940 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000001a93940(0000) GS:ffff8880aeb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000052 CR3: 0000000088278000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 07 00 00 00 00 00 00 00 07 07 00 00 00 00 07 07 00 00 00 00 <00> 56 52 51 50 41 50 41 51 41 52 41 53 48 8b 7d 08 e8 8b b8 46 RIP: trace_hardirqs_on_thunk+0x4/0x1c RSP: ffff88805333ff50 CR2: 0000000000000052 ---[ end trace b3328e96f2527cbf ]---