=============================
[ BUG: Invalid wait context ]
6.12.0-rc5-next-20241101-syzkaller #0 Not tainted
-----------------------------
syz.4.322/7581 is trying to lock:
ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: rmqueue_bulk mm/page_alloc.c:2328 [inline]
ffff88813fffc298 (&zone->lock){-.-.}-{3:3}, at: __rmqueue_pcplist+0x4c6/0x2b70 mm/page_alloc.c:3022
other info that might help us debug this:
context-{2:2}
7 locks held by syz.4.322/7581:
#0: ffff888020335b38 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x254/0x320 fs/file.c:1191
#1: ffff88806046e420 (sb_writers#5){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2953 [inline]
#1: ffff88806046e420 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:679
#2: ffff888030086b48 (&sb->s_type->i_mutex_key#12){++++}-{4:4}, at: inode_lock include/linux/fs.h:817 [inline]
#2: ffff888030086b48 (&sb->s_type->i_mutex_key#12){++++}-{4:4}, at: shmem_file_write_iter+0x80/0x120 mm/shmem.c:3269
#3: ffff88807b700be0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:208 [inline]
#3: ffff88807b700be0 (&mm->mmap_lock){++++}-{4:4}, at: get_mmap_lock_carefully mm/memory.c:6149 [inline]
#3: ffff88807b700be0 (&mm->mmap_lock){++++}-{4:4}, at: lock_mm_and_find_vma+0x32/0x2f0 mm/memory.c:6209
#4: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#4: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#4: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: __pte_offset_map+0x82/0x380 mm/pgtable-generic.c:287
#5: ffff88807f42c378 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#5: ffff88807f42c378 (ptlock_ptr(ptdesc)#2){+.+.}-{3:3}, at: __pte_offset_map_lock+0x1ba/0x300 mm/pgtable-generic.c:402
#6: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: spin_trylock include/linux/spinlock.h:361 [inline]
#6: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: rmqueue_pcplist mm/page_alloc.c:3051 [inline]
#6: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: rmqueue mm/page_alloc.c:3095 [inline]
#6: ffff8880b8744818 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x7e2/0x3870 mm/page_alloc.c:3492
stack backtrace:
CPU: 1 UID: 0 PID: 7581 Comm: syz.4.322 Not tainted 6.12.0-rc5-next-20241101-syzkaller #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:2328 [inline]
__rmqueue_pcplist+0x4c6/0x2b70 mm/page_alloc.c:3022
rmqueue_pcplist mm/page_alloc.c:3064 [inline]
rmqueue mm/page_alloc.c:3095 [inline]
get_page_from_freelist+0x895/0x3870 mm/page_alloc.c:3492
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4771
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:627
save_stack+0x109/0x1f0 mm/page_owner.c:157
__set_page_owner+0x92/0x800 mm/page_owner.c:320
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0x3725/0x3870 mm/page_alloc.c:3495
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4771
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:1219 [inline]
run_posix_cpu_timers+0x6ac/0x810 kernel/time/posix-cpu-timers.c:1418
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:1691 [inline]
__hrtimer_run_queues+0x551/0xd50 kernel/time/hrtimer.c:1755
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1817
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:__rcu_read_unlock+0x79/0x110 kernel/rcu/tree_plugin.h:440
Code: 4d 8d be 48 04 00 00 4c 89 f8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 88 00 00 00 41 83 3f 00 75 29 42 0f b6 04 23 84 c0 75 62 <41> 8b 45 00 3d 00 00 00 40 73 0f 5b 41 5c 41 5d 41 5e 41 5f 5d c3
RSP: 0018:ffffc9000459f2a8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff11004f2a088 RCX: ffffc9000459f203
RDX: 0000000000000006 RSI: ffffffff8c0ae700 RDI: ffffffff8c6054c0
RBP: 0000000000000001 R08: ffffffff901d0fb7 R09: 1ffffffff203a1f6
R10: dffffc0000000000 R11: fffffbfff203a1f7 R12: dffffc0000000000
R13: ffff888027950444 R14: ffff888027950000 R15: 1ffff920008b3e64
__page_table_check_ptes_set+0x30f/0x410 mm/page_table_check.c:225
page_table_check_ptes_set include/linux/page_table_check.h:74 [inline]
set_ptes include/linux/pgtable.h:267 [inline]
do_anonymous_page mm/memory.c:4860 [inline]
do_pte_missing mm/memory.c:3977 [inline]
handle_pte_fault+0x61a3/0x66b0 mm/memory.c:5801
__handle_mm_fault mm/memory.c:5944 [inline]
handle_mm_fault+0x1106/0x1bb0 mm/memory.c:6112
do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x2b9/0x8c0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0010:fault_in_readable+0x173/0x2d0 mm/gup.c:2235
Code: 00 fc ff df 4c 89 e8 4f 8d ac 25 ff 0f 00 00 49 81 e5 00 f0 ff ff 49 39 c5 72 7a e8 b7 76 b3 ff 4c 39 eb 74 7d 4c 89 64 24 08 <44> 8a 23 43 0f b6 04 3e 84 c0 75 18 44 88 64 24 40 48 81 c3 00 10
RSP: 0018:ffffc9000459fa40 EFLAGS: 00050287
RAX: ffffffff81e24749 RBX: 000000002000f000 RCX: 0000000000040000
RDX: ffffc9000bf21000 RSI: 00000000000014d7 RDI: 00000000000014d8
RBP: ffffc9000459faf8 R08: ffffffff81e246dc R09: ffffffff84b0fb59
R10: 0000000000000002 R11: ffff888027950000 R12: 0000000000001000
R13: 0000000020010000 R14: 1ffff920008b3f50 R15: dffffc0000000000
fault_in_iov_iter_readable+0x229/0x280 lib/iov_iter.c:94
generic_perform_write+0x259/0x6d0 mm/filemap.c:4045
shmem_file_write_iter+0xf9/0x120 mm/shmem.c:3279
new_sync_write fs/read_write.c:590 [inline]
vfs_write+0xaeb/0xd30 fs/read_write.c:683
ksys_write+0x183/0x2b0 fs/read_write.c:736
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:0x7f0599f7e719
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:00007f0599df9038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f059a135f80 RCX: 00007f0599f7e719
RDX: 000000000000fecc RSI: 0000000020000100 RDI: 0000000000000005
RBP: 00007f0599ff132e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f059a135f80 R15: 00007ffd3de79588
----------------
Code disassembly (best guess):
0: 4d 8d be 48 04 00 00 lea 0x448(%r14),%r15
7: 4c 89 f8 mov %r15,%rax
a: 48 c1 e8 03 shr $0x3,%rax
e: 42 0f b6 04 20 movzbl (%rax,%r12,1),%eax
13: 84 c0 test %al,%al
15: 0f 85 88 00 00 00 jne 0xa3
1b: 41 83 3f 00 cmpl $0x0,(%r15)
1f: 75 29 jne 0x4a
21: 42 0f b6 04 23 movzbl (%rbx,%r12,1),%eax
26: 84 c0 test %al,%al
28: 75 62 jne 0x8c
* 2a: 41 8b 45 00 mov 0x0(%r13),%eax <-- trapping instruction
2e: 3d 00 00 00 40 cmp $0x40000000,%eax
33: 73 0f jae 0x44
35: 5b pop %rbx
36: 41 5c pop %r12
38: 41 5d pop %r13
3a: 41 5e pop %r14
3c: 41 5f pop %r15
3e: 5d pop %rbp
3f: c3 ret