=============================
[ BUG: Invalid wait context ]
syzkaller #0 Not tainted
-----------------------------
syz.2.20416/30712 is trying to lock:
ff1100002849dbc8 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x208/0x8d0 arch/x86/kvm/xen.c:1872
other info that might help us debug this:
context-{2:2}
locks held by syz.2.20416/30712: 4, on CPU#1:
#0: ff11000036d100a8 (&vcpu->mutex){+.+.}-{4:4}, at: kvm_vcpu_ioctl+0x27f/0xfd0 virt/kvm/kvm_main.c:4547
#1: ff1100002849db48 (&kvm->arch.xen.xen_lock){+.+.}-{4:4}, at: kvm_xen_vcpu_set_attr+0x4d/0x1230 arch/x86/kvm/xen.c:939
#2: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:249 [inline]
#2: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:365 [inline]
#2: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_vcpu_set_attr+0x8e/0x1230 arch/x86/kvm/xen.c:940
#3: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:249 [inline]
#3: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:365 [inline]
#3: ff1100002849e118 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1d2/0x8d0 arch/x86/kvm/xen.c:1870
stack backtrace:
CPU: 1 UID: 0 PID: 30712 Comm: syz.2.20416 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 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+0xf5b/0x2de0 kernel/locking/lockdep.c:5238
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:174 [inline]
_raw_read_lock_irqsave+0x48/0x60 kernel/locking/spinlock.c:271
kvm_xen_set_evtchn_fast+0x208/0x8d0 arch/x86/kvm/xen.c:1872
xen_timer_callback+0x109/0x220 arch/x86/kvm/xen.c:139
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x371/0xa10 kernel/time/hrtimer.c:2136
hrtimer_interrupt+0x4cd/0xaa0 kernel/time/hrtimer.c:2255
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1051 [inline]
__sysvec_apic_timer_interrupt+0x102/0x430 arch/x86/kernel/apic/apic.c:1068
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:kvm_xen_vcpu_set_attr+0xfec/0x1230 arch/x86/kvm/xen.c:1184
Code: 31 f6 e8 77 b7 ff ff 42 80 7c 35 00 00 75 23 eb 29 e8 08 6e 6e 00 41 89 ed 45 31 e4 48 89 df 31 f6 e8 58 b7 ff ff 48 8b 2c 24 <42> 80 7c 35 00 00 74 08 48 89 df e8 44 ba e6 00 4c 8b 3b bf 02 00
RSP: 0018:ffa000000513f538 EFLAGS: 00000246
RAX: de64a9137e672a00 RBX: ff11000036d10000 RCX: ffffffff9bebfa01
RDX: 0000000000000001 RSI: ffffffff8e6abbea RDI: 00000000ffffffff
RBP: 1fe2200006da2000 R08: ffffffff91be31bf R09: 1ffffffff237c637
R10: dffffc0000000000 R11: fffffbfff237c638 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000003
kvm_arch_vcpu_ioctl+0x148b/0x23a0 arch/x86/kvm/x86.c:3843
kvm_vcpu_ioctl+0x7e3/0xfd0 virt/kvm/kvm_main.c:4756
vfs_ioctl fs/ioctl.c:52 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efe091a9c99
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:00007efe0a0fe028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007efe09436098 RCX: 00007efe091a9c99
RDX: 0000200000000440 RSI: 000000004048aecb RDI: 0000000000000009
RBP: 00007efe0923b18b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007efe09436130 R14: 00007efe09436098 R15: 00007ffe75a67648
----------------
Code disassembly (best guess):
0: 31 f6 xor %esi,%esi
2: e8 77 b7 ff ff call 0xffffb77e
7: 42 80 7c 35 00 00 cmpb $0x0,0x0(%rbp,%r14,1)
d: 75 23 jne 0x32
f: eb 29 jmp 0x3a
11: e8 08 6e 6e 00 call 0x6e6e1e
16: 41 89 ed mov %ebp,%r13d
19: 45 31 e4 xor %r12d,%r12d
1c: 48 89 df mov %rbx,%rdi
1f: 31 f6 xor %esi,%esi
21: e8 58 b7 ff ff call 0xffffb77e
26: 48 8b 2c 24 mov (%rsp),%rbp
* 2a: 42 80 7c 35 00 00 cmpb $0x0,0x0(%rbp,%r14,1) <-- trapping instruction
30: 74 08 je 0x3a
32: 48 89 df mov %rbx,%rdi
35: e8 44 ba e6 00 call 0xe6ba7e
3a: 4c 8b 3b mov (%rbx),%r15
3d: bf .byte 0xbf
3e: 02 00 add (%rax),%al