============================= [ BUG: Invalid wait context ] 6.16.0-next-20250807-syzkaller #0 Not tainted ----------------------------- modprobe/10744 is trying to lock: ffff88807cc9d410 (&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} 2 locks held by modprobe/10744: #0: ffff88807b6de2a0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_write_lock_killable include/linux/mmap_lock.h:415 [inline] #0: ffff88807b6de2a0 (&mm->mmap_lock){++++}-{4:4}, at: vm_mmap_pgoff+0x211/0x4d0 mm/util.c:578 #1: ffff88807cc9d960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline] #1: ffff88807cc9d960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline] #1: ffff88807cc9d960 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1c3/0x9b0 arch/x86/kvm/xen.c:1818 stack backtrace: CPU: 1 UID: 0 PID: 10744 Comm: modprobe Not tainted 6.16.0-next-20250807-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4830 [inline] check_wait_context kernel/locking/lockdep.c:4902 [inline] __lock_acquire+0xbcb/0xd20 kernel/locking/lockdep.c:5187 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __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+0x4e0/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:lock_is_held_type+0x137/0x190 kernel/locking/lockdep.c:5945 Code: 01 75 44 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 4c 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 05 39 e7 61 07 <48> 3b 44 24 08 75 43 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f RSP: 0018:ffffc90003edf478 EFLAGS: 00000206 RAX: cb205fa98a929800 RBX: 0000000000000000 RCX: cb205fa98a929800 RDX: 0000000000000000 RSI: ffffffff8de84af2 RDI: ffffffff8c04d300 RBP: 00000000ffffffff R08: ffff8880793a5a00 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000000 R12: 0000000000000246 R13: ffff8880793a5a00 R14: ffffffff8e539f40 R15: 0000000000000001 lock_is_held include/linux/lockdep.h:249 [inline] __might_resched+0xa6/0x610 kernel/sched/core.c:8919 down_read+0x22/0x2e0 kernel/locking/rwsem.c:1536 anon_vma_lock_read include/linux/rmap.h:137 [inline] validate_mm+0x1d4/0x4b0 mm/vma.c:679 mmap_region+0x15a5/0x20c0 mm/vma.c:2745 do_mmap+0xc45/0x10d0 mm/mmap.c:558 vm_mmap_pgoff+0x2a6/0x4d0 mm/util.c:580 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 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:0x7f4fd9bfb242 Code: 08 00 04 00 00 eb e2 90 41 f7 c1 ff 0f 00 00 75 27 55 89 cd 53 48 89 fb 48 85 ff 74 33 41 89 ea 48 89 df b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 5e 5b 5d c3 0f 1f 00 c7 05 46 40 01 00 16 00 RSP: 002b:00007ffcc8a34688 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4fd9bfb242 RDX: 0000000000000001 RSI: 0000000000061018 RDI: 0000000000000000 RBP: 0000000000000802 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000802 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f4fd98d26b0 R14: 00007ffcc8a34ac0 R15: 00000fff991468d4 ---------------- Code disassembly (best guess): 0: 01 75 44 add %esi,0x44(%rbp) 3: 48 c7 04 24 00 00 00 movq $0x0,(%rsp) a: 00 b: 9c pushf c: 8f 04 24 pop (%rsp) f: f7 04 24 00 02 00 00 testl $0x200,(%rsp) 16: 75 4c jne 0x64 18: 41 f7 c4 00 02 00 00 test $0x200,%r12d 1f: 74 01 je 0x22 21: fb sti 22: 65 48 8b 05 39 e7 61 mov %gs:0x761e739(%rip),%rax # 0x761e763 29: 07 * 2a: 48 3b 44 24 08 cmp 0x8(%rsp),%rax <-- trapping instruction 2f: 75 43 jne 0x74 31: 89 d8 mov %ebx,%eax 33: 48 83 c4 10 add $0x10,%rsp 37: 5b pop %rbx 38: 41 5c pop %r12 3a: 41 5d pop %r13 3c: 41 5e pop %r14 3e: 41 5f pop %r15