=============================
[ BUG: Invalid wait context ]
syzkaller #0 Not tainted
-----------------------------
syz.8.2785/15522 is trying to lock:
ffff888025e51430 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x254/0xeb0 arch/x86/kvm/xen.c:1820
other info that might help us debug this:
context-{2:2}
3 locks held by syz.8.2785/15522:
#0: ffff888057fd80b0 (&vcpu->mutex){+.+.}-{4:4}, at: kvm_vcpu_ioctl+0x280/0x1690 virt/kvm/kvm_main.c:4444
#1: ffff88804afb9980 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
#1: ffff88804afb9980 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
#1: ffff88804afb9980 (&kvm->srcu){.?.+}-{0:0}, at: kvm_vcpu_srcu_read_lock include/linux/kvm_host.h:953 [inline]
#1: ffff88804afb9980 (&kvm->srcu){.?.+}-{0:0}, at: vcpu_enter_guest arch/x86/kvm/x86.c:11428 [inline]
#1: ffff88804afb9980 (&kvm->srcu){.?.+}-{0:0}, at: vcpu_run+0x329c/0x54d0 arch/x86/kvm/x86.c:11612
#2: ffff888025e51980 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
#2: ffff888025e51980 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
#2: ffff888025e51980 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x23a/0xeb0 arch/x86/kvm/xen.c:1818
stack backtrace:
CPU: 1 UID: 0 PID: 15522 Comm: syz.8.2785 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 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+0xa12/0x1c90 kernel/locking/lockdep.c:5187
lock_acquire kernel/locking/lockdep.c:5868 [inline]
lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5825
__raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline]
_raw_read_lock_irqsave+0x46/0x90 kernel/locking/spinlock.c:236
kvm_xen_set_evtchn_fast+0x254/0xeb0 arch/x86/kvm/xen.c:1820
xen_timer_callback+0x1db/0x2a0 arch/x86/kvm/xen.c:140
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x5ed/0xad0 kernel/time/hrtimer.c:1841
hrtimer_interrupt+0x397/0x8e0 kernel/time/hrtimer.c:1903
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1041 [inline]
__sysvec_apic_timer_interrupt+0x10b/0x3f0 arch/x86/kernel/apic/apic.c:1058
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
sysvec_apic_timer_interrupt+0x9f/0xc0 arch/x86/kernel/apic/apic.c:1052
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__vmcs_readl arch/x86/kvm/vmx/vmx_ops.h:121 [inline]
RIP: 0010:vmcs_read32 arch/x86/kvm/vmx/vmx_ops.h:168 [inline]
RIP: 0010:vmx_read_guest_seg_limit arch/x86/kvm/vmx/vmx.c:802 [inline]
RIP: 0010:vmx_get_segment+0x28d/0x740 arch/x86/kvm/vmx/vmx.c:3537
Code: 84 8b 48 89 fa 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e 9e 03 00 00 4c 89 e8 48 c1 e0 04 8b 80 c8 fa 84 8b 41 0f 78 c7 <3e> 77 0e 45 31 ff 41 57 50 e8 55 16 13 0a 58 41 5f 4b 8d 44 6d 00
RSP: 0018:ffffc9000581f418 EFLAGS: 00000202
RAX: 0000000000004802 RBX: ffffc9000581f480 RCX: ffffffff8152b175
RDX: 1ffffffff1709f5b RSI: ffffffff8152b183 RDI: ffffffff8b84fad8
RBP: ffff888057fd8000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000000 R15: 00000000000fffff
kvm_get_segment arch/x86/kvm/x86.c:7812 [inline]
emulator_get_segment+0xc2/0x440 arch/x86/kvm/x86.c:8641
__linearize arch/x86/kvm/emulate.c:663 [inline]
__do_insn_fetch_bytes+0x1e0/0x720 arch/x86/kvm/emulate.c:859
x86_decode_insn+0xbbb/0x5a70 arch/x86/kvm/emulate.c:4779
x86_decode_emulated_instruction arch/x86/kvm/x86.c:9359 [inline]
x86_emulate_instruction+0xa43/0x1b00 arch/x86/kvm/x86.c:9411
kvm_mmu_page_fault+0xbfd/0x1cb0 arch/x86/kvm/mmu/mmu.c:6385
__vmx_handle_ept_violation arch/x86/kvm/vmx/common.h:108 [inline]
handle_ept_violation+0x2b4/0x6e0 arch/x86/kvm/vmx/vmx.c:5776
__vmx_handle_exit arch/x86/kvm/vmx/vmx.c:6623 [inline]
vmx_handle_exit+0x14bf/0x1c00 arch/x86/kvm/vmx/vmx.c:6640
vcpu_enter_guest arch/x86/kvm/x86.c:11454 [inline]
vcpu_run+0x33e1/0x54d0 arch/x86/kvm/x86.c:11612
kvm_arch_vcpu_ioctl_run+0x1023/0x1970 arch/x86/kvm/x86.c:11951
kvm_vcpu_ioctl+0x5eb/0x1690 virt/kvm/kvm_main.c:4476
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcbed78eec9
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:00007fcbee6cf038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcbed9e6090 RCX: 00007fcbed78eec9
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 00007fcbed811f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fcbed9e6128 R14: 00007fcbed9e6090 R15: 00007ffcd5e5b4c8
vkms_vblank_simulate: vblank timer overrun
vkms_vblank_simulate: vblank timer overrun
ip6_tunnel: ip6gre2 xmit: Local address not yet configured!
----------------
Code disassembly (best guess):
0: 84 8b 48 89 fa 48 test %cl,0x48fa8948(%rbx)
6: c1 ea 03 shr $0x3,%edx
9: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax
d: 84 c0 test %al,%al
f: 74 08 je 0x19
11: 3c 03 cmp $0x3,%al
13: 0f 8e 9e 03 00 00 jle 0x3b7
19: 4c 89 e8 mov %r13,%rax
1c: 48 c1 e0 04 shl $0x4,%rax
20: 8b 80 c8 fa 84 8b mov -0x747b0538(%rax),%eax
26: 41 0f 78 c7 vmread %rax,%r15
* 2a: 3e 77 0e ja,pt 0x3b <-- trapping instruction
2d: 45 31 ff xor %r15d,%r15d
30: 41 57 push %r15
32: 50 push %rax
33: e8 55 16 13 0a call 0xa13168d
38: 58 pop %rax
39: 41 5f pop %r15
3b: 4b 8d 44 6d 00 lea 0x0(%r13,%r13,2),%rax