oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz1,mems_allowed=0-1,oom_memcg=/syz1,task_memcg=/syz1,task=syz-executor.1,pid=5733,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: 5734, name: syz-executor.1
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
5 locks held by syz-executor.1/5734:
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __do_sys_sendfile64 fs/read_write.c:1311 [inline]
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __se_sys_sendfile64 fs/read_write.c:1297 [inline]
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297
#1: ffff888074ffec88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x287/0x500 fs/kernfs/file.c:287
#2: ffff88802279aa00 (kn->active#182){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2ab/0x500 fs/kernfs/file.c:288
#3: ffffffff8bc65e68 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607
#4: ffff888032afe120 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline]
#4: ffff888032afe120 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline]
#4: ffff888032afe120 (&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: 5734 Comm: syz-executor.1 Not tainted 5.17.0-rc1-next-20220127-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]
do_iter_readv_writev+0x47a/0x750 fs/read_write.c:726
do_iter_write+0x188/0x710 fs/read_write.c:852
vfs_iter_write+0x70/0xa0 fs/read_write.c:893
iter_file_splice_write+0x723/0xc70 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x110/0x180 fs/splice.c:936
splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
do_splice_direct+0x1b3/0x280 fs/splice.c:979
do_sendfile+0xaf2/0x1250 fs/read_write.c:1246
__do_sys_sendfile64 fs/read_write.c:1311 [inline]
__se_sys_sendfile64 fs/read_write.c:1297 [inline]
__x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297
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:0x7f84b9ffe059
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:00007f84b8973168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f84ba110f60 RCX: 00007f84b9ffe059
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000006
RBP: 00007f84ba05808d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff8396403f R14: 00007f84b8973300 R15: 0000000000022000
=============================
[ BUG: Invalid wait context ]
5.17.0-rc1-next-20220127-syzkaller #0 Tainted: G W
-----------------------------
syz-executor.1/5734 is trying to lock:
ffff888032afeb40 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline]
ffff888032afeb40 (&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}
5 locks held by syz-executor.1/5734:
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __do_sys_sendfile64 fs/read_write.c:1311 [inline]
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __se_sys_sendfile64 fs/read_write.c:1297 [inline]
#0: ffff88801e02c460 (sb_writers#10){.+.+}-{0:0}, at: __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297
#1: ffff888074ffec88 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x287/0x500 fs/kernfs/file.c:287
#2: ffff88802279aa00 (kn->active#182){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x2ab/0x500 fs/kernfs/file.c:288
#3: ffffffff8bc65e68 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607
#4: ffff888032afe120 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline]
#4: ffff888032afe120 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline]
#4: ffff888032afe120 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144
stack backtrace:
CPU: 1 PID: 5734 Comm: syz-executor.1 Tainted: G W 5.17.0-rc1-next-20220127-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]
do_iter_readv_writev+0x47a/0x750 fs/read_write.c:726
do_iter_write+0x188/0x710 fs/read_write.c:852
vfs_iter_write+0x70/0xa0 fs/read_write.c:893
iter_file_splice_write+0x723/0xc70 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x110/0x180 fs/splice.c:936
splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
do_splice_direct+0x1b3/0x280 fs/splice.c:979
do_sendfile+0xaf2/0x1250 fs/read_write.c:1246
__do_sys_sendfile64 fs/read_write.c:1311 [inline]
__se_sys_sendfile64 fs/read_write.c:1297 [inline]
__x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297
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:0x7f84b9ffe059
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:00007f84b8973168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f84ba110f60 RCX: 00007f84b9ffe059
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000006
RBP: 00007f84ba05808d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff8396403f R14: 00007f84b8973300 R15: 0000000000022000
BUG: sleeping function called from invalid context at kernel/futex/core.c:750
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5734, name: syz-executor.1
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 5734 Comm: syz-executor.1 Tainted: G W 5.17.0-rc1-next-20220127-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
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]
do_iter_readv_writev+0x47a/0x750 fs/read_write.c:726
do_iter_write+0x188/0x710 fs/read_write.c:852
vfs_iter_write+0x70/0xa0 fs/read_write.c:893
iter_file_splice_write+0x723/0xc70 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x110/0x180 fs/splice.c:936
splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
do_splice_direct+0x1b3/0x280 fs/splice.c:979
do_sendfile+0xaf2/0x1250 fs/read_write.c:1246
__do_sys_sendfile64 fs/read_write.c:1311 [inline]
__se_sys_sendfile64 fs/read_write.c:1297 [inline]
__x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1297
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:0x7f84b9ffe059
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:00007f84b8973168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f84ba110f60 RCX: 00007f84b9ffe059
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000006
RBP: 00007f84ba05808d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff8396403f R14: 00007f84b8973300 R15: 0000000000022000
Memory cgroup out of memory: Killed process 5734 (syz-executor.1) total-vm:60648kB, anon-rss:2480kB, file-rss:15140kB, shmem-rss:64kB, UID:0 pgtables:96kB oom_score_adj:1000