BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1348 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 10349, name: syz-executor.4 2 locks held by syz-executor.4/10349: #0: ffffffff8a96f400 (rcu_read_lock){....}-{1:2}, at: bpf_test_timer_enter+0x0/0xf0 net/bpf/test_run.c:329 #1: ffff88803e5a2b58 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #1: ffff88803e5a2b58 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x18d/0xd30 arch/x86/mm/fault.c:1331 Preemption disabled at: [] bpf_cgroup_storage_set include/linux/bpf-cgroup.h:181 [inline] [] bpf_test_run+0x267/0x920 net/bpf/test_run.c:110 CPU: 1 PID: 10349 Comm: syz-executor.4 Not tainted 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x93/0xc2 lib/dump_stack.c:120 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:8338 do_user_addr_fault+0x1ad/0xd30 arch/x86/mm/fault.c:1348 handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x60/0xc0 arch/x86/mm/fault.c:1531 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577 RIP: 0010:bpf_prog_e48ebe87b99394c4+0x11/0x948 Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 66 90 55 48 89 e5 31 c0 48 8b 47 28 <48> 8b 40 00 8b 80 d0 00 00 00 c9 c3 cc cc cc cc cc cc cc cc cc cc RSP: 0018:ffffc900018bfaf8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffffffffa005a6b8 RSI: ffffc90000f0a048 RDI: ffffc900018bfcb0 RBP: ffffc900018bfaf8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: ffffc900018bfc90 R14: ffffc900018bfcb0 R15: 0000000000000000 bpf_prog_run_xdp include/linux/filter.h:771 [inline] bpf_test_run+0x1cc/0x920 net/bpf/test_run.c:115 bpf_prog_test_run_xdp+0x284/0x470 net/bpf/test_run.c:720 bpf_prog_test_run kernel/bpf/syscall.c:3150 [inline] __do_sys_bpf+0x1030/0x39e0 kernel/bpf/syscall.c:4429 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465ef9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f403901f188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056c0b0 RCX: 0000000000465ef9 RDX: 0000000000000028 RSI: 0000000020000440 RDI: 000000000000000a RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0b0 R13: 00007ffd6098eb2f R14: 00007f403901f300 R15: 0000000000022000 BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 3dfce067 P4D 3dfce067 PUD 3e1e6067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 10349 Comm: syz-executor.4 Tainted: G W 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:bpf_prog_e48ebe87b99394c4+0x11/0x948 Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 66 90 55 48 89 e5 31 c0 48 8b 47 28 <48> 8b 40 00 8b 80 d0 00 00 00 c9 c3 cc cc cc cc cc cc cc cc cc cc RSP: 0018:ffffc900018bfaf8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffffffffa005a6b8 RSI: ffffc90000f0a048 RDI: ffffc900018bfcb0 RBP: ffffc900018bfaf8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: ffffc900018bfc90 R14: ffffc900018bfcb0 R15: 0000000000000000 FS: 00007f403901f700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd8639f720 CR3: 0000000022704000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_prog_run_xdp include/linux/filter.h:771 [inline] bpf_test_run+0x1cc/0x920 net/bpf/test_run.c:115 bpf_prog_test_run_xdp+0x284/0x470 net/bpf/test_run.c:720 bpf_prog_test_run kernel/bpf/syscall.c:3150 [inline] __do_sys_bpf+0x1030/0x39e0 kernel/bpf/syscall.c:4429 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x465ef9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f403901f188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056c0b0 RCX: 0000000000465ef9 RDX: 0000000000000028 RSI: 0000000020000440 RDI: 000000000000000a RBP: 00000000004bcd1c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0b0 R13: 00007ffd6098eb2f R14: 00007f403901f300 R15: 0000000000022000 Modules linked in: CR2: 0000000000000000 ---[ end trace bc778001ac768566 ]--- RIP: 0010:bpf_prog_e48ebe87b99394c4+0x11/0x948 Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 66 90 55 48 89 e5 31 c0 48 8b 47 28 <48> 8b 40 00 8b 80 d0 00 00 00 c9 c3 cc cc cc cc cc cc cc cc cc cc RSP: 0018:ffffc900018bfaf8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffffffffa005a6b8 RSI: ffffc90000f0a048 RDI: ffffc900018bfcb0 RBP: ffffc900018bfaf8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: ffffc900018bfc90 R14: ffffc900018bfcb0 R15: 0000000000000000 FS: 00007f403901f700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd8639f720 CR3: 0000000022704000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400