syz-executor.2 invoked oom-killer: gfp_mask=0xdc0(GFP_KERNEL|__GFP_ZERO), order=0, oom_score_adj=0 CPU: 1 PID: 3653 Comm: syz-executor.2 Not tainted 6.0.0-rc1-next-20220819-syzkaller #0 BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1521 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 3653, name: syz-executor.2 preempt_count: 0, expected: 0 RCU nest depth: 0, expected: 0 2 locks held by syz-executor.2/3653: #0: ffffffff8c0fdc00 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1876 [inline] #0: ffffffff8c0fdc00 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xe85/0x1300 mm/memcontrol.c:2675 #1: ffffffff8c0780a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1642 irq event stamp: 4981760 hardirqs last enabled at (4981759): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1352 [inline] hardirqs last enabled at (4981759): [] finish_lock_switch kernel/sched/core.c:4956 [inline] hardirqs last enabled at (4981759): [] finish_task_switch.isra.0+0x2b5/0xc70 kernel/sched/core.c:5074 hardirqs last disabled at (4981760): [] dump_stack_lvl+0x2e/0x134 lib/dump_stack.c:139 softirqs last enabled at (4981752): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (4981752): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 softirqs last disabled at (4981731): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (4981731): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 CPU: 1 PID: 3653 Comm: syz-executor.2 Not tainted 6.0.0-rc1-next-20220819-syzkaller #0 syz-executor.2[3653] cmdline: /root/syz-executor.2 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9896 down_read_killable+0x75/0x490 kernel/locking/rwsem.c:1521 mmap_read_lock_killable include/linux/mmap_lock.h:126 [inline] __access_remote_vm+0xac/0x6f0 mm/memory.c:5461 get_mm_cmdline.part.0+0x217/0x620 fs/proc/base.c:299 get_mm_cmdline fs/proc/base.c:367 [inline] get_task_cmdline_kernel+0x1d9/0x220 fs/proc/base.c:367 dump_stack_print_cmdline.part.0+0x82/0x150 lib/dump_stack.c:61 dump_stack_print_cmdline lib/dump_stack.c:89 [inline] dump_stack_print_info+0x185/0x190 lib/dump_stack.c:97 __dump_stack lib/dump_stack.c:121 [inline] dump_stack_lvl+0xc1/0x134 lib/dump_stack.c:140 dump_header+0x10b/0x7f9 mm/oom_kill.c:460 oom_kill_process.cold+0x10/0x15 mm/oom_kill.c:1036 out_of_memory+0x358/0x14a0 mm/oom_kill.c:1174 mem_cgroup_out_of_memory+0x206/0x270 mm/memcontrol.c:1652 mem_cgroup_oom mm/memcontrol.c:1882 [inline] try_charge_memcg+0xf13/0x1300 mm/memcontrol.c:2675 obj_cgroup_charge_pages mm/memcontrol.c:3041 [inline] obj_cgroup_charge+0x2ab/0x5e0 mm/memcontrol.c:3331 memcg_slab_pre_alloc_hook mm/slab.h:496 [inline] slab_pre_alloc_hook mm/slab.h:705 [inline] slab_alloc_node mm/slub.c:3157 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x96/0x3b0 mm/slub.c:3268 kmem_cache_zalloc include/linux/slab.h:729 [inline] __alloc_file+0x21/0x270 fs/file_table.c:138 alloc_empty_file+0x6d/0x170 fs/file_table.c:187 path_openat+0xe7/0x28f0 fs/namei.c:3677 do_filp_open+0x1b6/0x400 fs/namei.c:3718 do_sys_openat2+0x16d/0x4c0 fs/open.c:1308 do_sys_open fs/open.c:1324 [inline] __do_sys_openat fs/open.c:1340 [inline] __se_sys_openat fs/open.c:1335 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1335 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+0x63/0xcd RIP: 0033:0x7f06bae88db8 Code: 24 18 31 c0 41 83 e2 40 75 40 89 f0 25 00 00 41 00 3d 00 00 41 00 74 32 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 40 48 8b 4c 24 18 64 48 2b 0c 25 28 00 00 00 RSP: 002b:00007ffeb85d79f0 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00000000000003f1 RCX: 00007f06bae88db8 RDX: 0000000000090800 RSI: 00007f06baee2372 RDI: 00000000ffffff9c RBP: 00007ffeb85d7abc R08: 0000000000090800 R09: 00007f06baee2372 R10: 0000000000000000 R11: 0000000000000287 R12: 0000000000000000 R13: 00000000000989a4 R14: 0000000000000007 R15: 00007ffeb85d7b20 syz-executor.2[3653] cmdline: /root/syz-executor.2 exec Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:122 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:140 dump_header+0x10b/0x7f9 mm/oom_kill.c:460 oom_kill_process.cold+0x10/0x15 mm/oom_kill.c:1036 out_of_memory+0x358/0x14a0 mm/oom_kill.c:1174 mem_cgroup_out_of_memory+0x206/0x270 mm/memcontrol.c:1652 mem_cgroup_oom mm/memcontrol.c:1882 [inline] try_charge_memcg+0xf13/0x1300 mm/memcontrol.c:2675 obj_cgroup_charge_pages mm/memcontrol.c:3041 [inline] obj_cgroup_charge+0x2ab/0x5e0 mm/memcontrol.c:3331 memcg_slab_pre_alloc_hook mm/slab.h:496 [inline] slab_pre_alloc_hook mm/slab.h:705 [inline] slab_alloc_node mm/slub.c:3157 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x96/0x3b0 mm/slub.c:3268 kmem_cache_zalloc include/linux/slab.h:729 [inline] __alloc_file+0x21/0x270 fs/file_table.c:138 alloc_empty_file+0x6d/0x170 fs/file_table.c:187 path_openat+0xe7/0x28f0 fs/namei.c:3677 do_filp_open+0x1b6/0x400 fs/namei.c:3718 do_sys_openat2+0x16d/0x4c0 fs/open.c:1308 do_sys_open fs/open.c:1324 [inline] __do_sys_openat fs/open.c:1340 [inline] __se_sys_openat fs/open.c:1335 [inline] __x64_sys_openat+0x13f/0x1f0 fs/open.c:1335 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+0x63/0xcd RIP: 0033:0x7f06bae88db8 Code: 24 18 31 c0 41 83 e2 40 75 40 89 f0 25 00 00 41 00 3d 00 00 41 00 74 32 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 40 48 8b 4c 24 18 64 48 2b 0c 25 28 00 00 00 RSP: 002b:00007ffeb85d79f0 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00000000000003f1 RCX: 00007f06bae88db8 RDX: 0000000000090800 RSI: 00007f06baee2372 RDI: 00000000ffffff9c RBP: 00007ffeb85d7abc R08: 0000000000090800 R09: 00007f06baee2372 R10: 0000000000000000 R11: 0000000000000287 R12: 0000000000000000 R13: 00000000000989a4 R14: 0000000000000007 R15: 00007ffeb85d7b20 memory: usage 307200kB, limit 307200kB, failcnt 41941 swap: usage 0kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz2: anon 155648 file 159744 kernel 314257408 kernel_stack 98304 pagetables 90112 percpu 4736 sock 0 vmalloc 0 shmem 155648 zswap 0 zswapped 0 file_mapped 143360 file_dirty 0 file_writeback 0 swapcached 0 anon_thp 0 file_thp 0 shmem_thp 0 inactive_anon 155648 active_anon 155648 inactive_file 0 active_file 4096 unevictable 0 slab_reclaimable 80752 slab_unreclaimable 1059272 slab 1140024 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz2,mems_allowed=0-1,oom_memcg=/syz2,task_memcg=/syz2,task=syz-executor.2,pid=3653,uid=0 Memory cgroup out of memory: Killed process 3653 (syz-executor.2) total-vm:50536kB, anon-rss:396kB, file-rss:9072kB, shmem-rss:4kB, UID:0 pgtables:76kB oom_score_adj:0