============================= [ BUG: Invalid wait context ] 6.12.0-syzkaller-09088-g537a2525eaf7 #0 Not tainted ----------------------------- syz.2.17/6061 is trying to lock: ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: rmqueue_bulk mm/page_alloc.c:2307 [inline] ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: __rmqueue_pcplist+0x4a2/0x2a80 mm/page_alloc.c:3001 other info that might help us debug this: context-{5:5} 4 locks held by syz.2.17/6061: #0: ffff8880258d59a0 (&mm->mmap_lock){++++}-{4:4}, at: __might_fault+0xaa/0x120 mm/memory.c:6751 #1: ffff8880b873e798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 #2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: do_perf_sw_event kernel/events/core.c:10142 [inline] #2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: ___perf_sw_event+0x1bd/0x730 kernel/events/core.c:10176 #3: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: spin_trylock include/linux/spinlock.h:361 [inline] #3: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: rmqueue_pcplist mm/page_alloc.c:3030 [inline] #3: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: rmqueue mm/page_alloc.c:3074 [inline] #3: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x7d3/0x3790 mm/page_alloc.c:3471 stack backtrace: CPU: 1 UID: 0 PID: 6061 Comm: syz.2.17 Not tainted 6.12.0-syzkaller-09088-g537a2525eaf7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5176 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 rmqueue_bulk mm/page_alloc.c:2307 [inline] __rmqueue_pcplist+0x4a2/0x2a80 mm/page_alloc.c:3001 rmqueue_pcplist mm/page_alloc.c:3043 [inline] rmqueue mm/page_alloc.c:3074 [inline] get_page_from_freelist+0x886/0x3790 mm/page_alloc.c:3471 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:627 kasan_save_stack+0x4f/0x60 mm/kasan/common.c:48 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541 task_work_add+0xd9/0x490 kernel/task_work.c:77 __perf_event_overflow+0x78d/0xdc0 kernel/events/core.c:9908 perf_swevent_event+0x317/0x680 do_perf_sw_event kernel/events/core.c:10149 [inline] ___perf_sw_event+0x4f3/0x730 kernel/events/core.c:10176 __perf_sw_event_sched include/linux/perf_event.h:1497 [inline] perf_event_task_sched_out include/linux/perf_event.h:1530 [inline] prepare_task_switch kernel/sched/core.c:5173 [inline] context_switch kernel/sched/core.c:5316 [inline] __schedule+0x23df/0x4c30 kernel/sched/core.c:6756 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:7078 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5853 Code: 2b 00 74 08 4c 89 f7 e8 5a aa 8f 00 f6 44 24 61 02 0f 85 85 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25 RSP: 0018:ffffc90003537ac0 EFLAGS: 00000206 RAX: 0000000000000001 RBX: 1ffff920006a6f64 RCX: ffff88802694a8d8 RDX: dffffc0000000000 RSI: ffffffff8c0aea80 RDI: ffffffff8c6154a0 RBP: ffffc90003537c18 R08: ffffffff9431f8b7 R09: 1ffffffff2863f16 R10: dffffc0000000000 R11: fffffbfff2863f17 R12: 1ffff920006a6f60 R13: dffffc0000000000 R14: ffffc90003537b20 R15: 0000000000000246 __might_fault+0xc6/0x120 mm/memory.c:6751 _inline_copy_from_user include/linux/uaccess.h:162 [inline] _copy_from_user+0x2a/0xc0 lib/usercopy.c:18 copy_from_user include/linux/uaccess.h:212 [inline] copy_struct_from_user include/linux/uaccess.h:401 [inline] perf_copy_attr+0x166/0x860 kernel/events/core.c:12450 __do_sys_perf_event_open kernel/events/core.c:12750 [inline] __se_sys_perf_event_open+0xdf/0x34b0 kernel/events/core.c:12728 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f16e2580849 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f16e331f058 EFLAGS: 00000246 ORIG_RAX: 000000000000012a RAX: ffffffffffffffda RBX: 00007f16e2745fa0 RCX: 00007f16e2580849 RDX: ffffffffffffffff RSI: 0000000000000000 RDI: 0000000020000000 RBP: 00007f16e25f3986 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f16e2745fa0 R15: 00007ffe418b7298 ---------------- Code disassembly (best guess): 0: 2b 00 sub (%rax),%eax 2: 74 08 je 0xc 4: 4c 89 f7 mov %r14,%rdi 7: e8 5a aa 8f 00 call 0x8faa66 c: f6 44 24 61 02 testb $0x2,0x61(%rsp) 11: 0f 85 85 01 00 00 jne 0x19c 17: 41 f7 c7 00 02 00 00 test $0x200,%r15d 1e: 74 01 je 0x21 20: fb sti 21: 48 c7 44 24 40 0e 36 movq $0x45e0360e,0x40(%rsp) 28: e0 45 * 2a: 4b c7 44 25 00 00 00 movq $0x0,0x0(%r13,%r12,1) <-- trapping instruction 31: 00 00 33: 43 c7 44 25 09 00 00 movl $0x0,0x9(%r13,%r12,1) 3a: 00 00 3c: 43 rex.XB 3d: c7 .byte 0xc7 3e: 44 rex.R 3f: 25 .byte 0x25