=============================
[ BUG: Invalid wait context ]
syzkaller #0 Not tainted
-----------------------------
syz.0.133/6299 is trying to lock:
ffff888055551bc8 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x255/0xd70 arch/x86/kvm/xen.c:1872
other info that might help us debug this:
context-{2:2}
locks held by syz.0.133/6299: 1, on CPU#1:
#0: ffff888055552118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:249 [inline]
#0: ffff888055552118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:356 [inline]
#0: ffff888055552118 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x23b/0xd70 arch/x86/kvm/xen.c:1870
stack backtrace:
CPU: 1 UID: 0 PID: 6299 Comm: syz.0.133 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_lock_invalid_wait_context kernel/locking/lockdep.c:4874 [inline]
check_wait_context kernel/locking/lockdep.c:4946 [inline]
__lock_acquire+0xfcc/0x1f40 kernel/locking/lockdep.c:5238
lock_acquire kernel/locking/lockdep.c:5942 [inline]
lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:174 [inline]
_raw_read_lock_irqsave+0x46/0x90 kernel/locking/spinlock.c:271
kvm_xen_set_evtchn_fast+0x255/0xd70 arch/x86/kvm/xen.c:1872
xen_timer_callback+0x1db/0x2a0 arch/x86/kvm/xen.c:139
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x135/0x9a0 kernel/time/hrtimer.c:2136
hrtimer_interrupt+0x441/0xaa0 kernel/time/hrtimer.c:2255
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1051 [inline]
__sysvec_apic_timer_interrupt+0x109/0x470 arch/x86/kernel/apic/apic.c:1068
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x9e/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:37 [inline]
RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:139 [inline]
RIP: 0010:wrmsrq arch/x86/include/asm/msr.h:199 [inline]
RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:229 [inline]
RIP: 0010:__x2apic_send_IPI_dest arch/x86/kernel/apic/local.h:47 [inline]
RIP: 0010:x2apic_send_IPI+0x9a/0xe0 arch/x86/kernel/apic/x2apic_phys.c:50
Code: 8b 13 0f ae f0 0f ae e8 b9 00 04 00 00 41 83 fc 02 44 89 e0 48 0f 44 c1 48 c1 e2 20 b9 30 08 00 00 48 09 d0 48 c1 ea 20 0f 30 <66> 90 5b 5d 41 5c e9 8b b5 3b 0a 5b 31 d2 5d 48 89 c6 bf 30 08 00
RSP: 0018:ffffc90007e3fa08 EFLAGS: 00000246
RAX: 00000000000000fb RBX: ffff8880b80201dc RCX: 0000000000000830
RDX: 0000000000000000 RSI: 00000000000000fb RDI: ffffffff8e8fc920
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff926b135f R11: 0000000000000000 R12: 00000000000000fb
R13: 0000000000000000 R14: 1ffff92000fc7f01 R15: 0000000000000000
arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:95 [inline]
send_call_function_single_ipi kernel/smp.c:128 [inline]
__smp_call_single_queue+0x39c/0x450 kernel/smp.c:494
generic_exec_single+0xb4/0x400 kernel/smp.c:531
smp_call_function_single_async+0x68/0xd0 kernel/smp.c:833
rdmsrq_safe_on_cpu+0x103/0x1b0 arch/x86/lib/msr-smp.c:163
msr_read+0x18e/0x240 arch/x86/kernel/msr.c:69
vfs_read+0x1e4/0xb30 fs/read_write.c:552
ksys_read+0x12a/0x250 fs/read_write.c:696
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ffa069a9559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffa04bf6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007ffa06c25fa0 RCX: 00007ffa069a9559
RDX: 0000000000018ff8 RSI: 0000200000001ac0 RDI: 0000000000000006
RBP: 00007ffa06a38136 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffa06c26038 R14: 00007ffa06c25fa0 R15: 00007fff6761d348
----------------
Code disassembly (best guess):
0: 8b 13 mov (%rbx),%edx
2: 0f ae f0 mfence
5: 0f ae e8 lfence
8: b9 00 04 00 00 mov $0x400,%ecx
d: 41 83 fc 02 cmp $0x2,%r12d
11: 44 89 e0 mov %r12d,%eax
14: 48 0f 44 c1 cmove %rcx,%rax
18: 48 c1 e2 20 shl $0x20,%rdx
1c: b9 30 08 00 00 mov $0x830,%ecx
21: 48 09 d0 or %rdx,%rax
24: 48 c1 ea 20 shr $0x20,%rdx
28: 0f 30 wrmsr
* 2a: 66 90 xchg %ax,%ax <-- trapping instruction
2c: 5b pop %rbx
2d: 5d pop %rbp
2e: 41 5c pop %r12
30: e9 8b b5 3b 0a jmp 0xa3bb5c0
35: 5b pop %rbx
36: 31 d2 xor %edx,%edx
38: 5d pop %rbp
39: 48 89 c6 mov %rax,%rsi
3c: bf .byte 0xbf
3d: 30 08 xor %cl,(%rax)