=============================
[ BUG: Invalid wait context ]
6.16.0-rc7-syzkaller #0 Not tainted
-----------------------------
syz.1.666/8537 is trying to lock:
ffffc900057ca410 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x1fb/0x9b0 arch/x86/kvm/xen.c:1820
other info that might help us debug this:
context-{2:2}
3 locks held by syz.1.666/8537:
#0: ffff88801a4733e0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock_killable include/linux/mmap_lock.h:374 [inline]
#0: ffff88801a4733e0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x1bd/0x4c0 mm/util.c:577
#1: ffff888077e918f8 (&anon_vma->rwsem){++++}-{4:4}, at: anon_vma_lock_write include/linux/rmap.h:122 [inline]
#1: ffff888077e918f8 (&anon_vma->rwsem){++++}-{4:4}, at: vma_prepare+0x25c/0x4b0 mm/vma.c:306
#2: ffffc900057ca960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
#2: ffffc900057ca960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
#2: ffffc900057ca960 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1c3/0x9b0 arch/x86/kvm/xen.c:1818
stack backtrace:
CPU: 0 UID: 0 PID: 8537 Comm: syz.1.666 Not tainted 6.16.0-rc7-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_lock_invalid_wait_context kernel/locking/lockdep.c:4833 [inline]
check_wait_context kernel/locking/lockdep.c:4905 [inline]
__lock_acquire+0xbcb/0xd20 kernel/locking/lockdep.c:5190
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236
kvm_xen_set_evtchn_fast+0x1fb/0x9b0 arch/x86/kvm/xen.c:1820
xen_timer_callback+0x109/0x220 arch/x86/kvm/xen.c:140
__run_hrtimer kernel/time/hrtimer.c:1761 [inline]
__hrtimer_run_queues+0x4dd/0xc60 kernel/time/hrtimer.c:1825
hrtimer_interrupt+0x45b/0xaa0 kernel/time/hrtimer.c:1887
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline]
__sysvec_apic_timer_interrupt+0x108/0x410 arch/x86/kernel/apic/apic.c:1056
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:vma_iter_store_overwrite+0x317/0x8e0 mm/vma.h:501
Code: ac ff 4c 89 f7 e8 d9 be 51 09 eb 05 e8 52 3f ac ff 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 3c 51 0e 00 4c 8b 3b <48> 8d 7b 08 48 89 f8 48 c1 e8 03 42 80 3c 28 00 74 05 e8 22 51 0e
RSP: 0018:ffffc90002e573d0 EFLAGS: 00000246
RAX: 1ffff1100a36a6a0 RBX: ffff888051b53500 RCX: 0000000000080000
RDX: ffffc9000d68d000 RSI: 0000000000000160 RDI: 0000000000000161
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff34031cc R12: 0000200000ffffff
R13: dffffc0000000000 R14: ffffc90002e57910 R15: 0000200000fbe000
vma_iter_store_new mm/vma.h:509 [inline]
vma_complete+0x224/0xae0 mm/vma.c:351
__split_vma+0x8a6/0xa00 mm/vma.c:565
vms_gather_munmap_vmas+0x4ab/0x12b0 mm/vma.c:1375
__mmap_prepare mm/vma.c:2351 [inline]
__mmap_region mm/vma.c:2607 [inline]
mmap_region+0x678/0x1f30 mm/vma.c:2692
do_mmap+0xc45/0x10d0 mm/mmap.c:561
vm_mmap_pgoff+0x31b/0x4c0 mm/util.c:579
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2f4ff8e9a9
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:00007f2f50e0d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f2f501b6080 RCX: 00007f2f4ff8e9a9
RDX: 0000000002000006 RSI: 0000000000fbe000 RDI: 0000200000000000
RBP: 00007f2f50010d69 R08: ffffffffffffffff R09: 00000000d0fb6000
R10: 0000000000000031 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2f501b6080 R15: 00007f2f502dfa28
----------------
Code disassembly (best guess):
0: ac lods %ds:(%rsi),%al
1: ff 4c 89 f7 decl -0x9(%rcx,%rcx,4)
5: e8 d9 be 51 09 call 0x951bee3
a: eb 05 jmp 0x11
c: e8 52 3f ac ff call 0xffac3f63
11: 48 89 d8 mov %rbx,%rax
14: 48 c1 e8 03 shr $0x3,%rax
18: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
1d: 74 08 je 0x27
1f: 48 89 df mov %rbx,%rdi
22: e8 3c 51 0e 00 call 0xe5163
27: 4c 8b 3b mov (%rbx),%r15
* 2a: 48 8d 7b 08 lea 0x8(%rbx),%rdi <-- trapping instruction
2e: 48 89 f8 mov %rdi,%rax
31: 48 c1 e8 03 shr $0x3,%rax
35: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
3a: 74 05 je 0x41
3c: e8 .byte 0xe8
3d: 22 51 0e and 0xe(%rcx),%dl