=============================
[ BUG: Invalid wait context ]
6.12.0-next-20241119-syzkaller #0 Not tainted
-----------------------------
syz.1.1484/10093 is trying to lock:
ffffffff8ea6a918 (stack_list_lock){-.-.}-{3:3}, at: add_stack_record_to_list mm/page_owner.c:182 [inline]
ffffffff8ea6a918 (stack_list_lock){-.-.}-{3:3}, at: inc_stack_record_count mm/page_owner.c:214 [inline]
ffffffff8ea6a918 (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}
3 locks held by syz.1.1484/10093:
#0: ffff88807baeefe0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:189 [inline]
#0: ffff88807baeefe0 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x165/0xcb0 mm/mmap.c:1651
#1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287
#2: ffff888030c63198 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffff888030c63198 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:402
stack backtrace:
CPU: 1 UID: 0 PID: 10093 Comm: syz.1.1484 Not tainted 6.12.0-next-20241119-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/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+0x3725/0x3870 mm/page_alloc.c:3510
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4787
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: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:1739 [inline]
__hrtimer_run_queues+0x551/0xd50 kernel/time/hrtimer.c:1803
hrtimer_interrupt+0x403/0xa40 kernel/time/hrtimer.c:1865
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:get_current arch/x86/include/asm/current.h:49 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:245 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x8/0x90 kernel/kcov.c:314
Code: 44 0a 20 c3 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 4c 8b 04 24 <65> 48 8b 14 25 00 d6 03 00 65 8b 05 60 58 64 7e 25 00 01 ff 00 74
RSP: 0018:ffffc90016a67558 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888033249e00
RDX: 0000000000000000 RSI: 000000000000017b RDI: 0000000000000001
RBP: ffffc90016a67890 R08: ffffffff81ee1611 R09: 1ffffd40003c31d0
R10: dffffc0000000000 R11: fffff940003c31d1 R12: dffffc0000000000
R13: 1ffff1100649e084 R14: 000000000000017b R15: 800000007863a007
arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
folio_test_head include/linux/page-flags.h:824 [inline]
folio_test_large include/linux/page-flags.h:845 [inline]
zap_present_ptes mm/memory.c:1576 [inline]
zap_pte_range mm/memory.c:1627 [inline]
zap_pmd_range mm/memory.c:1753 [inline]
zap_pud_range mm/memory.c:1782 [inline]
zap_p4d_range mm/memory.c:1803 [inline]
unmap_page_range+0x11e1/0x4230 mm/memory.c:1824
unmap_vmas+0x3cc/0x5f0 mm/memory.c:1914
exit_mmap+0x292/0xcb0 mm/mmap.c:1667
__mmput+0x115/0x390 kernel/fork.c:1344
exit_mm+0x220/0x310 kernel/exit.c:570
do_exit+0x9b2/0x28e0 kernel/exit.c:925
do_group_exit+0x207/0x2c0 kernel/exit.c:1087
__do_sys_exit_group kernel/exit.c:1098 [inline]
__se_sys_exit_group kernel/exit.c:1096 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096
x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232
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:0x7f870897e759
Code: Unable to access opcode bytes at 0x7f870897e72f.
RSP: 002b:00007ffc2c3fa688 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f870897e759
RDX: 0000000000000064 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffc2c3fa6dc R08: 00007ffc2c3fa76f R09: 0000000000032589
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000032
R13: 0000000000032589 R14: 0000000000032514 R15: 00007ffc2c3fa730
----------------
Code disassembly (best guess):
0: 44 0a 20 or (%rax),%r12b
3: c3 ret
4: cc int3
5: cc int3
6: cc int3
7: cc int3
8: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
f: 00 00 00
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: f3 0f 1e fa endbr64
26: 4c 8b 04 24 mov (%rsp),%r8
* 2a: 65 48 8b 14 25 00 d6 mov %gs:0x3d600,%rdx <-- trapping instruction
31: 03 00
33: 65 8b 05 60 58 64 7e mov %gs:0x7e645860(%rip),%eax # 0x7e64589a
3a: 25 00 01 ff 00 and $0xff0100,%eax
3f: 74 .byte 0x74