============================= [ BUG: Invalid wait context ] 6.12.0-syzkaller-gc8d02b547363 #0 Not tainted ----------------------------- syz.1.168/6477 is trying to lock: ffffffff8ea761d8 (stack_list_lock){-.-.}-{3:3}, at: add_stack_record_to_list mm/page_owner.c:182 [inline] ffffffff8ea761d8 (stack_list_lock){-.-.}-{3:3}, at: inc_stack_record_count mm/page_owner.c:214 [inline] ffffffff8ea761d8 (stack_list_lock){-.-.}-{3:3}, at: __set_page_owner+0x5cb/0x800 mm/page_owner.c:329 other info that might help us debug this: context-{5:5} 3 locks held by syz.1.168/6477: #0: ffffffff8fcdc850 (pernet_ops_rwsem){++++}-{4:4}, at: copy_net_ns+0x328/0x570 net/core/net_namespace.c:496 #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 stack backtrace: CPU: 1 UID: 0 PID: 6477 Comm: syz.1.168 Not tainted 6.12.0-syzkaller-gc8d02b547363 #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 add_stack_record_to_list mm/page_owner.c:182 [inline] inc_stack_record_count mm/page_owner.c:214 [inline] __set_page_owner+0x5cb/0x800 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3474 __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 __schedule_loop kernel/sched/core.c:6833 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6848 netlink_table_grab+0x1e3/0x320 net/netlink/af_netlink.c:430 __netlink_kernel_create+0x36b/0x6f0 net/netlink/af_netlink.c:2039 netlink_kernel_create include/linux/netlink.h:62 [inline] genl_pernet_init+0xaa/0x160 net/netlink/genetlink.c:1886 ops_init+0x31e/0x590 net/core/net_namespace.c:138 setup_net+0x287/0x9e0 net/core/net_namespace.c:362 copy_net_ns+0x33f/0x570 net/core/net_namespace.c:500 create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110 copy_namespaces+0x41a/0x490 kernel/nsproxy.c:179 copy_process+0x1929/0x3d50 kernel/fork.c:2378 kernel_clone+0x226/0x8f0 kernel/fork.c:2787 __do_sys_clone kernel/fork.c:2930 [inline] __se_sys_clone kernel/fork.c:2914 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2914 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:0x7f7e24780809 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:00007ffc0b504cc8 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007f7e24945fa0 RCX: 00007f7e24780809 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000640c7000 RBP: 00007f7e247f393e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f7e24945fa0 R14: 00007f7e24945fa0 R15: 0000000000001330