pgfault 90201 pgmajfault 0 pgrefill 56 pgscan 53 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz0,mems_allowed=0,oom_memcg=/syz0,task_memcg=/syz0,task=syz-executor.0,pid=5008,uid=0 BUG: sleeping function called from invalid context at kernel/locking/mutex.c:577 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6201, name: syz-executor.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by syz-executor.0/6201: #0: ffff88800d0e1d28 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline] #0: ffff88800d0e1d28 (&mm->mmap_lock#2){++++}-{3:3}, at: __mm_populate+0x264/0x3e0 mm/gup.c:1586 #1: ffffffff852b6f60 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline] #1: ffffffff852b6f60 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xa49/0x1080 mm/memcontrol.c:2647 #2: ffffffff85278828 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x96/0x250 mm/memcontrol.c:1607 #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 6201 Comm: syz-executor.0 Not tainted 5.16.0-next-20220112 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 __mutex_lock_common kernel/locking/mutex.c:577 [inline] __mutex_lock+0x9e/0x1480 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5c0 mm/oom_kill.c:1003 out_of_memory+0x358/0x1460 mm/oom_kill.c:1132 mem_cgroup_out_of_memory+0x1e5/0x250 mm/memcontrol.c:1617 mem_cgroup_oom mm/memcontrol.c:1852 [inline] try_charge_memcg+0xcd4/0x1080 mm/memcontrol.c:2647 try_charge mm/memcontrol.c:2724 [inline] charge_memcg+0x24d/0x360 mm/memcontrol.c:6687 __mem_cgroup_charge+0x24/0x80 mm/memcontrol.c:6708 mem_cgroup_charge include/linux/memcontrol.h:667 [inline] do_anonymous_page mm/memory.c:3783 [inline] handle_pte_fault mm/memory.c:4568 [inline] __handle_mm_fault+0x1074/0x3570 mm/memory.c:4705 handle_mm_fault+0x2e6/0xa20 mm/memory.c:4803 faultin_page mm/gup.c:944 [inline] __get_user_pages+0x522/0x1120 mm/gup.c:1165 populate_vma_page_range+0x24d/0x330 mm/gup.c:1497 __mm_populate+0x1ea/0x3e0 mm/gup.c:1606 do_mlock+0x291/0x6b0 mm/mlock.c:689 __do_sys_mlock mm/mlock.c:697 [inline] __se_sys_mlock mm/mlock.c:695 [inline] __x64_sys_mlock+0x55/0x80 mm/mlock.c:695 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0ec3a8eb19 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:00007f0ec1004188 EFLAGS: 00000246 ORIG_RAX: 0000000000000095 RAX: ffffffffffffffda RBX: 00007f0ec3ba1f60 RCX: 00007f0ec3a8eb19 RDX: 0000000000000000 RSI: 0000000000c00000 RDI: 0000000020400000 RBP: 00007f0ec3ae8f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdfea2d04f R14: 00007f0ec1004300 R15: 0000000000022000 ============================= [ BUG: Invalid wait context ] 5.16.0-next-20220112 #1 Tainted: G W ----------------------------- syz-executor.0/6201 is trying to lock: ffff88803f9ead70 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline] ffff88803f9ead70 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 other info that might help us debug this: context-{4:4} 4 locks held by syz-executor.0/6201: #0: ffff88800d0e1d28 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_lock include/linux/mmap_lock.h:117 [inline] #0: ffff88800d0e1d28 (&mm->mmap_lock#2){++++}-{3:3}, at: __mm_populate+0x264/0x3e0 mm/gup.c:1586 #1: ffffffff852b6f60 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline] #1: ffffffff852b6f60 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xa49/0x1080 mm/memcontrol.c:2647 #2: ffffffff85278828 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x96/0x250 mm/memcontrol.c:1607 #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #3: ffff88803f9ea360 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 stack backtrace: CPU: 0 PID: 6201 Comm: syz-executor.0 Tainted: G W 5.16.0-next-20220112 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4678 [inline] check_wait_context kernel/locking/lockdep.c:4739 [inline] __lock_acquire.cold+0xc8/0x3b4 kernel/locking/lockdep.c:4977 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1a2/0x4d0 kernel/locking/lockdep.c:5604 __mutex_lock_common kernel/locking/mutex.c:600 [inline] __mutex_lock+0x136/0x1480 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5c0 mm/oom_kill.c:1003 out_of_memory+0x358/0x1460 mm/oom_kill.c:1132 mem_cgroup_out_of_memory+0x1e5/0x250 mm/memcontrol.c:1617 mem_cgroup_oom mm/memcontrol.c:1852 [inline] try_charge_memcg+0xcd4/0x1080 mm/memcontrol.c:2647 try_charge mm/memcontrol.c:2724 [inline] charge_memcg+0x24d/0x360 mm/memcontrol.c:6687 __mem_cgroup_charge+0x24/0x80 mm/memcontrol.c:6708 mem_cgroup_charge include/linux/memcontrol.h:667 [inline] do_anonymous_page mm/memory.c:3783 [inline] handle_pte_fault mm/memory.c:4568 [inline] __handle_mm_fault+0x1074/0x3570 mm/memory.c:4705 handle_mm_fault+0x2e6/0xa20 mm/memory.c:4803 faultin_page mm/gup.c:944 [inline] __get_user_pages+0x522/0x1120 mm/gup.c:1165 populate_vma_page_range+0x24d/0x330 mm/gup.c:1497 __mm_populate+0x1ea/0x3e0 mm/gup.c:1606 do_mlock+0x291/0x6b0 mm/mlock.c:689 __do_sys_mlock mm/mlock.c:697 [inline] __se_sys_mlock mm/mlock.c:695 [inline] __x64_sys_mlock+0x55/0x80 mm/mlock.c:695 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f0ec3a8eb19 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:00007f0ec1004188 EFLAGS: 00000246 ORIG_RAX: 0000000000000095 RAX: ffffffffffffffda RBX: 00007f0ec3ba1f60 RCX: 00007f0ec3a8eb19 RDX: 0000000000000000 RSI: 0000000000c00000 RDI: 0000000020400000 RBP: 00007f0ec3ae8f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdfea2d04f R14: 00007f0ec1004300 R15: 0000000000022000 Memory cgroup out of memory: Killed process 5008 (syz-executor.0) total-vm:93544kB, anon-rss:12724kB, file-rss:34816kB, shmem-rss:0kB, UID:0 pgtables:156kB oom_score_adj:1000 oom_reaper: reaped process 5008 (syz-executor.0), now anon-rss:0kB, file-rss:34816kB, shmem-rss:0kB loop1: detected capacity change from 0 to 512 loop4: detected capacity change from 0 to 512 EXT4-fs (loop4): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop4): __ext4_new_inode:1071: comm syz-executor.4: reserved inode found cleared - inode=3 EXT4-fs (loop1): mounted filesystem without journal. Quota mode: none. loop7: detected capacity change from 0 to 512 EXT4-fs error (device loop1): __ext4_new_inode:1071: comm syz-executor.1: reserved inode found cleared - inode=3 loop3: detected capacity change from 0 to 240 loop5: detected capacity change from 0 to 512 loop4: detected capacity change from 0 to 512 EXT4-fs (loop4): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop4): __ext4_new_inode:1071: comm syz-executor.4: reserved inode found cleared - inode=3 isofs_fill_super: bread failed, dev=loop3, iso_blknum=60, block=120 EXT4-fs (loop7): corrupt root inode, run e2fsck EXT4-fs (loop7): mount failed loop6: detected capacity change from 0 to 512 EXT4-fs (loop5): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop5): __ext4_new_inode:1071: comm syz-executor.5: reserved inode found cleared - inode=3 loop1: detected capacity change from 0 to 512 EXT4-fs (loop6): mounted filesystem without journal. Quota mode: none. loop4: detected capacity change from 0 to 512 EXT4-fs error (device loop6): __ext4_new_inode:1071: comm syz-executor.6: reserved inode found cleared - inode=3 EXT4-fs (loop1): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop1): __ext4_new_inode:1071: comm syz-executor.1: reserved inode found cleared - inode=3 EXT4-fs (loop4): mounted filesystem without journal. Quota mode: none. EXT4-fs error (device loop4): __ext4_new_inode:1071: comm syz-executor.4: reserved inode found cleared - inode=3