workingset_refault_anon 0 workingset_refault_file 1 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz4,mems_allowed=0-1,oom_memcg=/syz4,task_memcg=/syz4,task=syz-executor.4,pid=10315,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: 10323, name: syz-executor.4 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 6 locks held by syz-executor.4/10323: #0: ffff888074c15270 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:1034 #1: ffff88801a014460 (sb_writers#10){.+.+}-{0:0}, at: ksys_write+0x12d/0x250 fs/read_write.c:643 #2: ffff88807858c088 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x287/0x500 fs/kernfs/file.c:287 #3: ffff88801bef12c0 (kn->active#182){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2ab/0x500 fs/kernfs/file.c:288 #4: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607 #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 10323 Comm: syz-executor.4 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 memory_max_write+0x263/0x3c0 mm/memcontrol.c:6313 cgroup_file_write+0x1de/0x760 kernel/cgroup/cgroup.c:3882 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2074 [inline] new_sync_write+0x431/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 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:0x7f66dcc36059 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f66db5ab168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f66dcd48f60 RCX: 00007f66dcc36059 RDX: 0000000000000012 RSI: 0000000020000240 RDI: 0000000000000006 RBP: 00007f66dcc9008d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcdc2d0fdf R14: 00007f66db5ab300 R15: 0000000000022000 ============================= [ BUG: Invalid wait context ] 5.17.0-rc1-next-20220124-syzkaller #0 Tainted: G W ----------------------------- syz-executor.4/10323 is trying to lock: ffff8880775db0c0 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline] ffff8880775db0c0 (&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} 6 locks held by syz-executor.4/10323: #0: ffff888074c15270 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:1034 #1: ffff88801a014460 (sb_writers#10){.+.+}-{0:0}, at: ksys_write+0x12d/0x250 fs/read_write.c:643 #2: ffff88807858c088 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x287/0x500 fs/kernfs/file.c:287 #3: ffff88801bef12c0 (kn->active#182){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2ab/0x500 fs/kernfs/file.c:288 #4: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607 #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #5: ffff8880775da6a0 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 stack backtrace: CPU: 1 PID: 10323 Comm: syz-executor.4 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 memory_max_write+0x263/0x3c0 mm/memcontrol.c:6313 cgroup_file_write+0x1de/0x760 kernel/cgroup/cgroup.c:3882 kernfs_fop_write_iter+0x342/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2074 [inline] new_sync_write+0x431/0x660 fs/read_write.c:503 vfs_write+0x7cd/0xae0 fs/read_write.c:590 ksys_write+0x12d/0x250 fs/read_write.c:643 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:0x7f66dcc36059 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f66db5ab168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f66dcd48f60 RCX: 00007f66dcc36059 RDX: 0000000000000012 RSI: 0000000020000240 RDI: 0000000000000006 RBP: 00007f66dcc9008d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcdc2d0fdf R14: 00007f66db5ab300 R15: 0000000000022000 Memory cgroup out of memory: Killed process 10323 (syz-executor.4) total-vm:60780kB, anon-rss:2480kB, file-rss:15108kB, shmem-rss:92kB, UID:0 pgtables:100kB oom_score_adj:1000