kmem_cache_node 51KB 51KB kmem_cache 78KB 78KB oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=syz0,mems_allowed=0,global_oom,task_memcg=/syz0,task=syz-executor.0,pid=14574,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: 14574, name: syz-executor.0 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz-executor.0/14574: #0: ffff88800759e130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1668 [inline] #0: ffff88800759e130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_setsockopt+0x156/0x3c40 net/packet/af_packet.c:3761 #1: ffffffff85279028 (oom_lock){+.+.}-{3:3}, at: __alloc_pages_may_oom mm/page_alloc.c:4281 [inline] #1: ffffffff85279028 (oom_lock){+.+.}-{3:3}, at: __alloc_pages_slowpath.constprop.0+0xcc9/0x1f10 mm/page_alloc.c:5063 #2: ffff888035f388a0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #2: ffff888035f388a0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #2: ffff888035f388a0 (&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: 14574 Comm: syz-executor.0 Not tainted 5.16.0-rc8-next-20220110 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 __mutex_lock_common kernel/locking/mutex.c:577 [inline] __mutex_lock+0x9e/0x1480 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5c0 mm/oom_kill.c:1003 out_of_memory+0x1198/0x1460 mm/oom_kill.c:1114 __alloc_pages_may_oom mm/page_alloc.c:4332 [inline] __alloc_pages_slowpath.constprop.0+0x1972/0x1f10 mm/page_alloc.c:5063 __alloc_pages+0x403/0x4e0 mm/page_alloc.c:5394 alloc_pages+0x1a0/0x2f0 mm/mempolicy.c:2271 vm_area_alloc_pages mm/vmalloc.c:2904 [inline] __vmalloc_area_node mm/vmalloc.c:2967 [inline] __vmalloc_node_range+0xb2a/0xfd0 mm/vmalloc.c:3106 __vmalloc_node+0xb5/0x100 mm/vmalloc.c:3156 alloc_one_pg_vec_page net/packet/af_packet.c:4291 [inline] alloc_pg_vec net/packet/af_packet.c:4316 [inline] packet_set_ring+0xb60/0x1b20 net/packet/af_packet.c:4401 packet_setsockopt+0x1b4f/0x3c40 net/packet/af_packet.c:3778 __sys_setsockopt+0x180/0x2a0 net/socket.c:2180 __do_sys_setsockopt net/socket.c:2191 [inline] __se_sys_setsockopt net/socket.c:2188 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2188 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fcde07f7b19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcdddd6d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fcde090af60 RCX: 00007fcde07f7b19 RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000003 RBP: 00007fcde0851f6d R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdb1fe7a9f R14: 00007fcdddd6d300 R15: 0000000000022000 ============================= [ BUG: Invalid wait context ] 5.16.0-rc8-next-20220110 #1 Tainted: G W ----------------------------- syz-executor.0/14574 is trying to lock: ffff888035f392b0 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1058 [inline] ffff888035f392b0 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 other info that might help us debug this: context-{4:4} 3 locks held by syz-executor.0/14574: #0: ffff88800759e130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1668 [inline] #0: ffff88800759e130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_setsockopt+0x156/0x3c40 net/packet/af_packet.c:3761 #1: ffffffff85279028 (oom_lock){+.+.}-{3:3}, at: __alloc_pages_may_oom mm/page_alloc.c:4281 [inline] #1: ffffffff85279028 (oom_lock){+.+.}-{3:3}, at: __alloc_pages_slowpath.constprop.0+0xcc9/0x1f10 mm/page_alloc.c:5063 #2: ffff888035f388a0 (&p->alloc_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] #2: ffff888035f388a0 (&p->alloc_lock){+.+.}-{2:2}, at: task_lock include/linux/sched/task.h:170 [inline] #2: ffff888035f388a0 (&p->alloc_lock){+.+.}-{2:2}, at: find_lock_task_mm+0xe3/0x2b0 mm/oom_kill.c:144 stack backtrace: CPU: 1 PID: 14574 Comm: syz-executor.0 Tainted: G W 5.16.0-rc8-next-20220110 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 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+0xc8/0x3b4 kernel/locking/lockdep.c:4977 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1a2/0x4d0 kernel/locking/lockdep.c:5604 __mutex_lock_common kernel/locking/mutex.c:600 [inline] __mutex_lock+0x136/0x1480 kernel/locking/mutex.c:733 futex_cleanup_begin kernel/futex/core.c:1058 [inline] futex_exit_release+0x2d/0x220 kernel/futex/core.c:1110 __oom_kill_process+0x373/0xf90 mm/oom_kill.c:893 oom_kill_process+0xd7/0x5c0 mm/oom_kill.c:1003 out_of_memory+0x1198/0x1460 mm/oom_kill.c:1114 __alloc_pages_may_oom mm/page_alloc.c:4332 [inline] __alloc_pages_slowpath.constprop.0+0x1972/0x1f10 mm/page_alloc.c:5063 __alloc_pages+0x403/0x4e0 mm/page_alloc.c:5394 alloc_pages+0x1a0/0x2f0 mm/mempolicy.c:2271 vm_area_alloc_pages mm/vmalloc.c:2904 [inline] __vmalloc_area_node mm/vmalloc.c:2967 [inline] __vmalloc_node_range+0xb2a/0xfd0 mm/vmalloc.c:3106 __vmalloc_node+0xb5/0x100 mm/vmalloc.c:3156 alloc_one_pg_vec_page net/packet/af_packet.c:4291 [inline] alloc_pg_vec net/packet/af_packet.c:4316 [inline] packet_set_ring+0xb60/0x1b20 net/packet/af_packet.c:4401 packet_setsockopt+0x1b4f/0x3c40 net/packet/af_packet.c:3778 __sys_setsockopt+0x180/0x2a0 net/socket.c:2180 __do_sys_setsockopt net/socket.c:2191 [inline] __se_sys_setsockopt net/socket.c:2188 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2188 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fcde07f7b19 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcdddd6d188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fcde090af60 RCX: 00007fcde07f7b19 RDX: 0000000000000005 RSI: 0000000000000107 RDI: 0000000000000003 RBP: 00007fcde0851f6d R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdb1fe7a9f R14: 00007fcdddd6d300 R15: 0000000000022000 Out of memory (oom_kill_allocating_task): Killed process 14573 (syz-executor.0) total-vm:93412kB, anon-rss:428kB, file-rss:35136kB, shmem-rss:0kB, UID:0 pgtables:136kB oom_score_adj:1000 oom_reaper: reaped process 14573 (syz-executor.0), now anon-rss:0kB, file-rss:34840kB, shmem-rss:0kB loop3: detected capacity change from 0 to 4096 EXT4-fs (loop3): mounted filesystem without journal. Quota mode: writeback. loop3: detected capacity change from 0 to 4096 PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created EXT4-fs (loop3): mounted filesystem without journal. Quota mode: writeback. PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff] PM: hibernation: Basic memory bitmaps created PM: hibernation: Basic memory bitmaps freed syz-executor.6 (14807) used greatest stack depth: 23944 bytes left audit: type=1400 audit(1641814999.059:11): avc: denied { module_load } for pid=14861 comm="syz-executor.7" path="/sys/power/pm_test" dev="sysfs" ino=106 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=system permissive=1 rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled audit: type=1400 audit(1641815001.864:12): avc: denied { checkpoint_restore } for pid=15213 comm="syz-executor.0" capability=40 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 netlink: 16 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. loop5: detected capacity change from 0 to 6 loop5: detected capacity change from 0 to 6 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'. loop1: detected capacity change from 0 to 36 loop5: detected capacity change from 0 to 6 loop5: detected capacity change from 0 to 6 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.2'.