=============================
[ BUG: Invalid wait context ]
6.12.0-syzkaller-09073-g9f16d5e6f220 #0 Not tainted
-----------------------------
syz.1.16/6009 is trying to lock:
ffffffff8dfa2598 (stack_list_lock){-.-.}-{3:3}, at: add_stack_record_to_list mm/page_owner.c:182 [inline]
ffffffff8dfa2598 (stack_list_lock){-.-.}-{3:3}, at: inc_stack_record_count mm/page_owner.c:214 [inline]
ffffffff8dfa2598 (stack_list_lock){-.-.}-{3:3}, at: __set_page_owner+0x5ac/0x790 mm/page_owner.c:329
other info that might help us debug this:
context-{2:2}
4 locks held by syz.1.16/6009:
#0: ffff888024ac32a0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline]
#0: ffff888024ac32a0 (&mm->mmap_lock){++++}-{4:4}, at: exit_mmap+0x10c/0xb30 mm/mmap.c:1651
#1: ffffffff8ddbaf40 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8ddbaf40 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8ddbaf40 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287
#2: ffff8880232b02b8 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#2: ffff8880232b02b8 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:402
#3: ffffffff8ddbae80 (rcu_read_lock_sched){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#3: ffffffff8ddbae80 (rcu_read_lock_sched){....}-{1:2}, at: rcu_read_lock_sched include/linux/rcupdate.h:941 [inline]
#3: ffffffff8ddbae80 (rcu_read_lock_sched){....}-{1:2}, at: pfn_valid include/linux/mmzone.h:2048 [inline]
#3: ffffffff8ddbae80 (rcu_read_lock_sched){....}-{1:2}, at: page_table_check_clear mm/page_table_check.c:70 [inline]
#3: ffffffff8ddbae80 (rcu_read_lock_sched){....}-{1:2}, at: __page_table_check_pte_clear+0x1ba/0x580 mm/page_table_check.c:169
stack backtrace:
CPU: 0 UID: 57142 PID: 6009 Comm: syz.1.16 Not tainted 6.12.0-syzkaller-09073-g9f16d5e6f220 #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+0x116/0x1f0 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+0x878/0x3c40 kernel/locking/lockdep.c:5176
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 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+0x5ac/0x790 mm/page_owner.c:329
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556
prep_new_page mm/page_alloc.c:1564 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
stack_depot_save_flags+0x566/0x900 lib/stackdepot.c:627
kasan_save_stack+0x42/0x60 mm/kasan/common.c:48
__kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541
task_work_add+0xc0/0x3b0 kernel/task_work.c:77
__run_posix_cpu_timers kernel/time/posix-cpu-timers.c:1223 [inline]
run_posix_cpu_timers+0x69f/0x7d0 kernel/time/posix-cpu-timers.c:1422
update_process_times+0x1a1/0x2d0 kernel/time/timer.c:2526
tick_sched_handle kernel/time/tick-sched.c:276 [inline]
tick_nohz_handler+0x376/0x530 kernel/time/tick-sched.c:297
__run_hrtimer kernel/time/hrtimer.c:1739 [inline]
__hrtimer_run_queues+0x5fb/0xae0 kernel/time/hrtimer.c:1803
hrtimer_interrupt+0x392/0x8e0 kernel/time/hrtimer.c:1865
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x400 arch/x86/kernel/apic/apic.c:1055
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0x9f/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_acquire.part.0+0x155/0x380 kernel/locking/lockdep.c:5814
Code: b8 ff ff ff ff 65 0f c1 05 e0 88 97 7e 83 f8 01 0f 85 d0 01 00 00 9c 58 f6 c4 02 0f 85 e5 01 00 00 48 85 ed 0f 85 b6 01 00 00 <48> b8 00 00 00 00 00 fc ff df 48 01 c3 48 c7 03 00 00 00 00 48 c7
RSP: 0018:ffffc90003ec74f8 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 1ffff920007d8ea0 RCX: 00000000165cf183
RDX: 0000000000000001 RSI: ffffffff8b4cda80 RDI: ffffffff8bb06b60
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff2d35f98
R10: ffffffff969afcc7 R11: 0000000000000003 R12: 0000000000000000
R13: ffffffff8ddbae80 R14: 0000000000000000 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
rcu_read_lock_sched include/linux/rcupdate.h:941 [inline]
pfn_valid include/linux/mmzone.h:2048 [inline]
page_table_check_clear mm/page_table_check.c:70 [inline]
__page_table_check_pte_clear+0x1c0/0x580 mm/page_table_check.c:169
page_table_check_pte_clear include/linux/page_table_check.h:49 [inline]
ptep_get_and_clear_full arch/x86/include/asm/pgtable.h:1337 [inline]
get_and_clear_full_ptes include/linux/pgtable.h:705 [inline]
zap_present_folio_ptes mm/memory.c:1502 [inline]
zap_present_ptes mm/memory.c:1585 [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+0x22e2/0x3d40 mm/memory.c:1824
unmap_single_vma+0x194/0x2b0 mm/memory.c:1870
unmap_vmas+0x22f/0x490 mm/memory.c:1914
exit_mmap+0x1c6/0xb30 mm/mmap.c:1667
__mmput+0x12a/0x480 kernel/fork.c:1347
mmput+0x62/0x70 kernel/fork.c:1369
exit_mm kernel/exit.c:570 [inline]
do_exit+0x9bf/0x2d70 kernel/exit.c:925
do_group_exit+0xd3/0x2a0 kernel/exit.c:1087
get_signal+0x2576/0x2610 kernel/signal.c:3016
arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x150/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0d51d7e819
Code: Unable to access opcode bytes at 0x7f0d51d7e7ef.
RSP: 002b:00007f0d52a960e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f0d51f36088 RCX: 00007f0d51d7e819
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f0d51f36088
RBP: 00007f0d51f36080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0d51f3608c
R13: 0000000000000000 R14: 00007ffe0be0e7e0 R15: 00007ffe0be0e8c8
----------------
Code disassembly (best guess):
0: b8 ff ff ff ff mov $0xffffffff,%eax
5: 65 0f c1 05 e0 88 97 xadd %eax,%gs:0x7e9788e0(%rip) # 0x7e9788ed
c: 7e
d: 83 f8 01 cmp $0x1,%eax
10: 0f 85 d0 01 00 00 jne 0x1e6
16: 9c pushf
17: 58 pop %rax
18: f6 c4 02 test $0x2,%ah
1b: 0f 85 e5 01 00 00 jne 0x206
21: 48 85 ed test %rbp,%rbp
24: 0f 85 b6 01 00 00 jne 0x1e0
* 2a: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction
31: fc ff df
34: 48 01 c3 add %rax,%rbx
37: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
3e: 48 rex.W
3f: c7 .byte 0xc7