BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1330 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 26723, name: syz-executor.3 6 locks held by syz-executor.3/26723: #0: ffff8880998ef098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:267 #1: ffff8880998ef130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write_lock drivers/tty/tty_io.c:888 [inline] #1: ffff8880998ef130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: do_tty_write drivers/tty/tty_io.c:911 [inline] #1: ffff8880998ef130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: tty_write+0x280/0x870 drivers/tty/tty_io.c:1046 #2: ffff8880998ef2e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1bf/0xf80 drivers/tty/n_tty.c:2316 #3: ffffc90000f44378 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0xa05/0xf80 drivers/tty/n_tty.c:2355 #4: ffffffff89bcb580 (console_lock){+.+.}-{0:0}, at: do_con_write+0x10f/0x1d70 drivers/tty/vt/vt.c:2863 #5: ffff888051503268 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:56 [inline] #5: ffff888051503268 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x25e/0xbf0 arch/x86/mm/fault.c:1313 Preemption disabled at: [] preempt_schedule_notrace_thunk+0x16/0x31 arch/x86/entry/thunk_64.S:41 CPU: 1 PID: 26723 Comm: syz-executor.3 Not tainted 5.9.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x198/0x1fd lib/dump_stack.c:118 ___might_sleep.cold+0x1ef/0x235 kernel/sched/core.c:7299 do_user_addr_fault+0x28b/0xbf0 arch/x86/mm/fault.c:1330 handle_page_fault arch/x86/mm/fault.c:1429 [inline] exc_page_fault+0xa8/0x190 arch/x86/mm/fault.c:1482 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:538 RIP: 0010:0x41b58ab3 Code: Bad RIP value. RSP: 0018:ffffc90016b9f8e0 EFLAGS: 00010246 RAX: ffffffff89bbd540 RBX: 0000000000000000 RCX: ffffffff89bd6a40 RDX: ffffffff815a71a5 RSI: 0000000000000000 RDI: 1ffff92002d73f1b RBP: ffffffff83c4f00c R08: 0000000000000000 R09: ffffffff814e6350 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000000 R14: 0000000000000000 R15: ffff888091318428