oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz5,mems_allowed=0-1,oom_memcg=/syz5,task_memcg=/syz5,task=syz-executor.5,pid=3736,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: 3736, name: syz-executor.5 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 4 locks held by syz-executor.5/3736: #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:787 [inline] #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: lookup_slow fs/namei.c:1723 [inline] #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: walk_component+0x400/0x6a0 fs/namei.c:2020 #1: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline] #1: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xafd/0x10f0 mm/memcontrol.c:2647 #2: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607 #3: ffff88801e5443e0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #3: ffff88801e5443e0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #3: ffff88801e5443e0 (&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: 3736 Comm: syz-executor.5 Not tainted 5.17.0-rc1-next-20220124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9576 __mutex_lock_common kernel/locking/mutex.c:577 [inline] __mutex_lock+0x9f/0x12f0 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x26/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5b0 mm/oom_kill.c:1003 out_of_memory+0x358/0x14b0 mm/oom_kill.c:1132 mem_cgroup_out_of_memory+0x206/0x270 mm/memcontrol.c:1617 mem_cgroup_oom mm/memcontrol.c:1852 [inline] try_charge_memcg+0xd79/0x10f0 mm/memcontrol.c:2647 obj_cgroup_charge_pages+0x1e/0x90 mm/memcontrol.c:3017 obj_cgroup_charge+0xf3/0x280 mm/memcontrol.c:3286 memcg_slab_pre_alloc_hook mm/slab.h:490 [inline] slab_pre_alloc_hook mm/slab.h:710 [inline] slab_alloc_node mm/slub.c:3144 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x92/0x3a0 mm/slub.c:3243 ext4_alloc_inode+0x1a/0x640 fs/ext4/super.c:1319 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1cc/0x740 fs/inode.c:1283 __ext4_iget+0x3a1/0x4160 fs/ext4/inode.c:4702 ext4_lookup fs/ext4/namei.c:1785 [inline] ext4_lookup+0x383/0x730 fs/ext4/namei.c:1760 __lookup_slow+0x24c/0x480 fs/namei.c:1707 lookup_slow fs/namei.c:1724 [inline] walk_component+0x40f/0x6a0 fs/namei.c:2020 lookup_last fs/namei.c:2475 [inline] path_lookupat+0x1bb/0x860 fs/namei.c:2499 filename_lookup+0x1c6/0x590 fs/namei.c:2528 user_path_at_empty+0x42/0x60 fs/namei.c:2851 user_path_at include/linux/namei.h:57 [inline] ksys_umount fs/namespace.c:1795 [inline] __do_sys_umount fs/namespace.c:1803 [inline] __se_sys_umount fs/namespace.c:1801 [inline] __x64_sys_umount+0xf8/0x180 fs/namespace.c:1801 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fc5290bf4c7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe79d5ca28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc5290bf4c7 RDX: 00007ffe79d5cb00 RSI: 000000000000000a RDI: 00007ffe79d5caf0 RBP: 00007ffe79d5caf0 R08: 00000000ffffffff R09: 00007ffe79d5c8c0 R10: 0000555556d5a893 R11: 0000000000000246 R12: 00007fc5291171ea R13: 00007ffe79d5dbb0 R14: 0000555556d5a810 R15: 00007ffe79d5dbf0 ============================= [ BUG: Invalid wait context ] 5.17.0-rc1-next-20220124-syzkaller #0 Tainted: G W ----------------------------- syz-executor.5/3736 is trying to lock: ffff88801e544e00 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline] ffff88801e544e00 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_exit_release+0x26/0x220 kernel/futex/core.c:1110 other info that might help us debug this: context-{4:4} 4 locks held by syz-executor.5/3736: #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:787 [inline] #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: lookup_slow fs/namei.c:1723 [inline] #0: ffff88803e68c9b8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: walk_component+0x400/0x6a0 fs/namei.c:2020 #1: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline] #1: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xafd/0x10f0 mm/memcontrol.c:2647 #2: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607 #3: ffff88801e5443e0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #3: ffff88801e5443e0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #3: ffff88801e5443e0 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 stack backtrace: CPU: 0 PID: 3736 Comm: syz-executor.5 Tainted: G W 5.17.0-rc1-next-20220124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 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+0x213/0x3ab kernel/locking/lockdep.c:4977 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __mutex_lock_common kernel/locking/mutex.c:600 [inline] __mutex_lock+0x12f/0x12f0 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x26/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5b0 mm/oom_kill.c:1003 out_of_memory+0x358/0x14b0 mm/oom_kill.c:1132 mem_cgroup_out_of_memory+0x206/0x270 mm/memcontrol.c:1617 mem_cgroup_oom mm/memcontrol.c:1852 [inline] try_charge_memcg+0xd79/0x10f0 mm/memcontrol.c:2647 obj_cgroup_charge_pages+0x1e/0x90 mm/memcontrol.c:3017 obj_cgroup_charge+0xf3/0x280 mm/memcontrol.c:3286 memcg_slab_pre_alloc_hook mm/slab.h:490 [inline] slab_pre_alloc_hook mm/slab.h:710 [inline] slab_alloc_node mm/slub.c:3144 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x92/0x3a0 mm/slub.c:3243 ext4_alloc_inode+0x1a/0x640 fs/ext4/super.c:1319 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1cc/0x740 fs/inode.c:1283 __ext4_iget+0x3a1/0x4160 fs/ext4/inode.c:4702 ext4_lookup fs/ext4/namei.c:1785 [inline] ext4_lookup+0x383/0x730 fs/ext4/namei.c:1760 __lookup_slow+0x24c/0x480 fs/namei.c:1707 lookup_slow fs/namei.c:1724 [inline] walk_component+0x40f/0x6a0 fs/namei.c:2020 lookup_last fs/namei.c:2475 [inline] path_lookupat+0x1bb/0x860 fs/namei.c:2499 filename_lookup+0x1c6/0x590 fs/namei.c:2528 user_path_at_empty+0x42/0x60 fs/namei.c:2851 user_path_at include/linux/namei.h:57 [inline] ksys_umount fs/namespace.c:1795 [inline] __do_sys_umount fs/namespace.c:1803 [inline] __se_sys_umount fs/namespace.c:1801 [inline] __x64_sys_umount+0xf8/0x180 fs/namespace.c:1801 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fc5290bf4c7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe79d5ca28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc5290bf4c7 RDX: 00007ffe79d5cb00 RSI: 000000000000000a RDI: 00007ffe79d5caf0 RBP: 00007ffe79d5caf0 R08: 00000000ffffffff R09: 00007ffe79d5c8c0 R10: 0000555556d5a893 R11: 0000000000000246 R12: 00007fc5291171ea R13: 00007ffe79d5dbb0 R14: 0000555556d5a810 R15: 00007ffe79d5dbf0 BUG: sleeping function called from invalid context at kernel/futex/core.c:750 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3736, name: syz-executor.5 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 3736 Comm: syz-executor.5 Tainted: G W 5.17.0-rc1-next-20220124-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9576 __might_fault+0x6c/0x170 mm/memory.c:5269 fetch_robust_entry kernel/futex/core.c:750 [inline] exit_robust_list+0x5d/0x2c0 kernel/futex/core.c:778 futex_cleanup kernel/futex/core.c:1010 [inline] futex_exit_release+0x183/0x220 kernel/futex/core.c:1111 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5b0 mm/oom_kill.c:1003 out_of_memory+0x358/0x14b0 mm/oom_kill.c:1132 mem_cgroup_out_of_memory+0x206/0x270 mm/memcontrol.c:1617 mem_cgroup_oom mm/memcontrol.c:1852 [inline] try_charge_memcg+0xd79/0x10f0 mm/memcontrol.c:2647 obj_cgroup_charge_pages+0x1e/0x90 mm/memcontrol.c:3017 obj_cgroup_charge+0xf3/0x280 mm/memcontrol.c:3286 memcg_slab_pre_alloc_hook mm/slab.h:490 [inline] slab_pre_alloc_hook mm/slab.h:710 [inline] slab_alloc_node mm/slub.c:3144 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x92/0x3a0 mm/slub.c:3243 ext4_alloc_inode+0x1a/0x640 fs/ext4/super.c:1319 alloc_inode+0x61/0x230 fs/inode.c:260 iget_locked+0x1cc/0x740 fs/inode.c:1283 __ext4_iget+0x3a1/0x4160 fs/ext4/inode.c:4702 ext4_lookup fs/ext4/namei.c:1785 [inline] ext4_lookup+0x383/0x730 fs/ext4/namei.c:1760 __lookup_slow+0x24c/0x480 fs/namei.c:1707 lookup_slow fs/namei.c:1724 [inline] walk_component+0x40f/0x6a0 fs/namei.c:2020 lookup_last fs/namei.c:2475 [inline] path_lookupat+0x1bb/0x860 fs/namei.c:2499 filename_lookup+0x1c6/0x590 fs/namei.c:2528 user_path_at_empty+0x42/0x60 fs/namei.c:2851 user_path_at include/linux/namei.h:57 [inline] ksys_umount fs/namespace.c:1795 [inline] __do_sys_umount fs/namespace.c:1803 [inline] __se_sys_umount fs/namespace.c:1801 [inline] __x64_sys_umount+0xf8/0x180 fs/namespace.c:1801 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fc5290bf4c7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe79d5ca28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc5290bf4c7 RDX: 00007ffe79d5cb00 RSI: 000000000000000a RDI: 00007ffe79d5caf0 RBP: 00007ffe79d5caf0 R08: 00000000ffffffff R09: 00007ffe79d5c8c0 R10: 0000555556d5a893 R11: 0000000000000246 R12: 00007fc5291171ea R13: 00007ffe79d5dbb0 R14: 0000555556d5a810 R15: 00007ffe79d5dbf0 Memory cgroup out of memory: Killed process 3736 (syz-executor.5) total-vm:56676kB, anon-rss:396kB, file-rss:15240kB, shmem-rss:4kB, UID:0 pgtables:76kB oom_score_adj:0