BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1355 in_atomic(): 0, irqs_disabled(): 1, pid: 6493, name: syz-executor.4 1 lock held by syz-executor.4/6493: #0: 000000004804acf1 (&mm->mmap_sem){++++}, at: __do_page_fault+0x3e2/0xde0 arch/x86/mm/fault.c:1341 irq event stamp: 6211854 hardirqs last enabled at (6211853): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (6211853): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192 hardirqs last disabled at (6211854): [] exit_to_usermode_loop+0x1bb/0x2a0 arch/x86/entry/common.c:175 softirqs last enabled at (6211804): [] tcp_close+0x8d1/0xfd0 net/ipv4/tcp.c:2503 softirqs last disabled at (6211802): [] spin_lock_bh include/linux/spinlock.h:334 [inline] softirqs last disabled at (6211802): [] release_sock+0x1b/0x1b0 net/core/sock.c:2879 CPU: 0 PID: 6493 Comm: syz-executor.4 Not tainted 4.19.142-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+0x1fc/0x2fe lib/dump_stack.c:118 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6196 __do_page_fault+0x40d/0xde0 arch/x86/mm/fault.c:1355 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205 RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffff88805648ff38 EFLAGS: 00010093 RAX: ffff8880564841c0 RBX: ffff8880564841c0 RCX: ffffffff81007b5f RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: ffff88805648ff58 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000002 R14: ffffffff81009d38 R15: 0000000000000000 BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 PGD 5644b067 P4D 5644b067 PUD 5644c067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6493 Comm: syz-executor.4 Tainted: G W 4.19.142-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010: (null) Code: Bad RIP value. RSP: 0018:ffff88805648ff38 EFLAGS: 00010093 RAX: ffff8880564841c0 RBX: ffff8880564841c0 RCX: ffffffff81007b5f RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: ffff88805648ff58 R08: 0000000000000000 R09: 0000000000000000 kasan: CONFIG_KASAN_INLINE enabled R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000002 kasan: GPF could be caused by NULL-ptr deref or user memory access R13: 0000000000000002 R14: ffffffff81009d38 R15: 0000000000000000 FS: 0000000003499940(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000005644a000 CR4: 00000000001426f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: Modules linked in: CR2: 0000000000000000 ---[ end trace f17d6786c64afa33 ]--- general protection fault: 0000 [#2] PREEMPT SMP KASAN RIP: 0010: (null) CPU: 1 PID: 6495 Comm: syz-executor.5 Tainted: G D W 4.19.142-syzkaller #0 Code: Bad RIP value. Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RSP: 0018:ffff88805648ff38 EFLAGS: 00010093 RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:317 [inline] RIP: 0010:test_ti_thread_flag include/linux/thread_info.h:84 [inline] RIP: 0010:addr_limit_user_check include/linux/syscalls.h:262 [inline] RIP: 0010:prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] RIP: 0010:syscall_return_slowpath arch/x86/entry/common.c:271 [inline] RIP: 0010:do_syscall_64+0x218/0x620 arch/x86/entry/common.c:296 RAX: ffff8880564841c0 RBX: ffff8880564841c0 RCX: ffffffff81007b5f Code: 8e 17 69 00 fa 66 0f 1f 44 00 00 65 48 8b 1c 25 40 ee 70 77 77 07 70 77 77 07 89 da 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 83 03 00 00 4c 8b 23 31 ff 49 c1 ec 1f 41 83 e4 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RSP: 0018:ffff888053b6ff28 EFLAGS: 00010007 RBP: ffff88805648ff58 R08: 0000000000000000 R09: 0000000000000000 RAX: dffffc0000000000 RBX: ffffffffffffffff RCX: ffffffff810099b3 R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000002 RDX: 000000001fffffff RSI: ffffffff810099f2 RDI: 0000000000000005 R13: 0000000000000002 R14: ffffffff81009d38 R15: 0000000000000000 RBP: ffff888053b6ff58 R08: 0000000000000000 R09: 0000000000000000 FS: 0000000003499940(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 R10: 0000000000000005 R11: ffffffff8ad3805b R12: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 R13: ffffffff88d25b58 R14: 0000000000000000 R15: 0000000000000000 CR2: ffffffffffffffd6 CR3: 000000005644a000 CR4: 00000000001426f0 FS: 0000000002944940(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 CR2: 0000001b31422000 CR3: 0000000053b42000 CR4: 00000000001426e0