oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz1,mems_allowed=0-1,oom_memcg=/syz1,task_memcg=/syz1,task=syz-executor.1,pid=3629,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: 3629, name: syz-executor.1
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
3 locks held by syz-executor.1/3629:
#0: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline]
#0: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xafd/0x10f0 mm/memcontrol.c:2647
#1: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607
#2: ffff888022268960 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline]
#2: ffff888022268960 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline]
#2: ffff888022268960 (&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: 3629 Comm: syz-executor.1 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
sk_prot_alloc+0x5f/0x290 net/core/sock.c:1917
sk_alloc+0x32/0xa80 net/core/sock.c:1976
inet6_create net/ipv6/af_inet6.c:184 [inline]
inet6_create+0x36f/0x1030 net/ipv6/af_inet6.c:111
__sock_create+0x353/0x790 net/socket.c:1468
sock_create net/socket.c:1519 [inline]
__sys_socket+0xef/0x200 net/socket.c:1561
__do_sys_socket net/socket.c:1570 [inline]
__se_sys_socket net/socket.c:1568 [inline]
__x64_sys_socket+0x6f/0xb0 net/socket.c:1568
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:0x7f07afe1f6d7
Code: f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 29 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:00007ffc31d78e58 EFLAGS: 00000206 ORIG_RAX: 0000000000000029
RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 00007f07afe1f6d7
RDX: 0000000000000006 RSI: 0000000000000001 RDI: 000000000000000a
RBP: 00007ffc31d78e80 R08: 0000000000000000 R09: ff78736871746264
R10: 0000000000000010 R11: 0000000000000206 R12: 0000000000000032
R13: 0000000000036839 R14: 0000000000000002 R15: 00007f07afeffb60
=============================
[ BUG: Invalid wait context ]
5.17.0-rc1-next-20220124-syzkaller #0 Tainted: G W
-----------------------------
syz-executor.1/3629 is trying to lock:
ffff888022269380 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline]
ffff888022269380 (&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}
3 locks held by syz-executor.1/3629:
#0: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: mem_cgroup_oom mm/memcontrol.c:1846 [inline]
#0: ffffffff8bce23c0 (memcg_oom_lock#2){+.+.}-{0:0}, at: try_charge_memcg+0xafd/0x10f0 mm/memcontrol.c:2647
#1: ffffffff8bc645a8 (oom_lock){+.+.}-{3:3}, at: mem_cgroup_out_of_memory+0x8d/0x270 mm/memcontrol.c:1607
#2: ffff888022268960 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline]
#2: ffff888022268960 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline]
#2: ffff888022268960 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144
stack backtrace:
CPU: 1 PID: 3629 Comm: syz-executor.1 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
sk_prot_alloc+0x5f/0x290 net/core/sock.c:1917
sk_alloc+0x32/0xa80 net/core/sock.c:1976
inet6_create net/ipv6/af_inet6.c:184 [inline]
inet6_create+0x36f/0x1030 net/ipv6/af_inet6.c:111
__sock_create+0x353/0x790 net/socket.c:1468
sock_create net/socket.c:1519 [inline]
__sys_socket+0xef/0x200 net/socket.c:1561
__do_sys_socket net/socket.c:1570 [inline]
__se_sys_socket net/socket.c:1568 [inline]
__x64_sys_socket+0x6f/0xb0 net/socket.c:1568
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:0x7f07afe1f6d7
Code: f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 29 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:00007ffc31d78e58 EFLAGS: 00000206 ORIG_RAX: 0000000000000029
RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 00007f07afe1f6d7
RDX: 0000000000000006 RSI: 0000000000000001 RDI: 000000000000000a
RBP: 00007ffc31d78e80 R08: 0000000000000000 R09: ff78736871746264
R10: 0000000000000010 R11: 0000000000000206 R12: 0000000000000032
R13: 0000000000036839 R14: 0000000000000002 R15: 00007f07afeffb60
Memory cgroup out of memory: Killed process 3629 (syz-executor.1) total-vm:56676kB, anon-rss:388kB, file-rss:15240kB, shmem-rss:4kB, UID:0 pgtables:84kB oom_score_adj:0