=============================
[ BUG: Invalid wait context ]
6.13.0-syzkaller-02526-gc4b9570cfb63 #0 Not tainted
-----------------------------
syz.0.185/6722 is trying to lock:
ffffffff8ea70258 (stack_list_lock){-.-.}-{3:3}, at: add_stack_record_to_list mm/page_owner.c:182 [inline]
ffffffff8ea70258 (stack_list_lock){-.-.}-{3:3}, at: inc_stack_record_count mm/page_owner.c:214 [inline]
ffffffff8ea70258 (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-{2:2}
1 lock held by syz.0.185/6722:
#0: ffffffff8fcb7710 (pernet_ops_rwsem){++++}-{4:4}, at: copy_net_ns+0x328/0x570 net/core/net_namespace.c:512
stack backtrace:
CPU: 1 UID: 0 PID: 6722 Comm: syz.0.185 Not tainted 6.13.0-syzkaller-02526-gc4b9570cfb63 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/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:4828 [inline]
check_wait_context kernel/locking/lockdep.c:4900 [inline]
__lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5178
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851
__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:1558
prep_new_page mm/page_alloc.c:1566 [inline]
get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753
alloc_pages_mpol_noprof+0x3e1/0x780 mm/mempolicy.c:2269
stack_depot_save_flags+0x72d/0x940 lib/stackdepot.c:627
kasan_save_stack+0x4f/0x60 mm/kasan/common.c:48
__kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:544
task_work_add+0xd9/0x490 kernel/task_work.c:77
__run_posix_cpu_timers kernel/time/posix-cpu-timers.c:1223 [inline]
run_posix_cpu_timers+0x6ac/0x810 kernel/time/posix-cpu-timers.c:1422
tick_sched_handle kernel/time/tick-sched.c:276 [inline]
tick_nohz_handler+0x37c/0x500 kernel/time/tick-sched.c:297
__run_hrtimer kernel/time/hrtimer.c:1738 [inline]
__hrtimer_run_queues+0x551/0xd30 kernel/time/hrtimer.c:1802
hrtimer_interrupt+0x403/0xa40 kernel/time/hrtimer.c:1864
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline]
__sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:on_stack arch/x86/include/asm/stacktrace.h:58 [inline]
RIP: 0010:stack_access_ok arch/x86/kernel/unwind_orc.c:393 [inline]
RIP: 0010:deref_stack_reg arch/x86/kernel/unwind_orc.c:403 [inline]
RIP: 0010:unwind_next_frame+0xb98/0x22d0 arch/x86/kernel/unwind_orc.c:585
Code: c1 ef 03 43 80 3c 27 00 74 08 48 89 df e8 d0 36 ba 00 4c 8b 74 24 08 4d 8b 66 10 48 b8 00 00 00 00 00 fc ff df 48 8b 4c 24 20 <0f> b6 04 01 84 c0 0f 85 67 12 00 00 48 8b 04 24 4c 8d 68 f8 41 83
RSP: 0018:ffffc900038a7350 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffffc900038a7430 RCX: 1ffff92000714e84
RDX: ffffffff90a86dc8 RSI: 0000000000000002 RDI: ffffffff814bbe70
RBP: ffffc900038a0000 R08: 0000000000000001 R09: ffffc900038a7510
R10: ffffc900038a7470 R11: ffffffff818b3db0 R12: ffffc900038a8000
R13: ffffc900038a7420 R14: ffffc900038a7420 R15: 1ffff92000714e86
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:319 [inline]
__kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:345
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4119 [inline]
slab_alloc_node mm/slub.c:4168 [inline]
kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4175
__proc_create+0x44f/0xa50 fs/proc/generic.c:425
proc_create_reg+0x90/0x110 fs/proc/generic.c:552
proc_create_net_single+0xb8/0x1b0 fs/proc/proc_net.c:214
can_init_proc+0xa8/0x360 net/can/proc.c:442
can_pernet_init+0x2ad/0x2d0 net/can/af_can.c:808
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:516
create_new_namespaces+0x425/0x7b0 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x124/0x180 kernel/nsproxy.c:228
ksys_unshare+0x57d/0xa70 kernel/fork.c:3330
__do_sys_unshare kernel/fork.c:3401 [inline]
__se_sys_unshare kernel/fork.c:3399 [inline]
__ia32_sys_unshare+0x37/0x40 kernel/fork.c:3399
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0xb4/0x110 arch/x86/entry/common.c:386
do_fast_syscall_32+0x34/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7f37579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000f508655c EFLAGS: 00000206 ORIG_RAX: 0000000000000136
RAX: ffffffffffffffda RBX: 0000000040000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
----------------
Code disassembly (best guess):
0: c1 ef 03 shr $0x3,%edi
3: 43 80 3c 27 00 cmpb $0x0,(%r15,%r12,1)
8: 74 08 je 0x12
a: 48 89 df mov %rbx,%rdi
d: e8 d0 36 ba 00 call 0xba36e2
12: 4c 8b 74 24 08 mov 0x8(%rsp),%r14
17: 4d 8b 66 10 mov 0x10(%r14),%r12
1b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
22: fc ff df
25: 48 8b 4c 24 20 mov 0x20(%rsp),%rcx
* 2a: 0f b6 04 01 movzbl (%rcx,%rax,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 67 12 00 00 jne 0x129d
36: 48 8b 04 24 mov (%rsp),%rax
3a: 4c 8d 68 f8 lea -0x8(%rax),%r13
3e: 41 rex.B
3f: 83 .byte 0x83