============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G L ----------------------------- syz.2.735/8404 is trying to lock: ffff88805a2752d0 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x253/0xe80 arch/x86/kvm/xen.c:1819 other info that might help us debug this: context-{2:2} 1 lock held by syz.2.735/8404: #0: ffff88805a275850 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:187 [inline] #0: ffff88805a275850 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:294 [inline] #0: ffff88805a275850 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x245/0xe80 arch/x86/kvm/xen.c:1817 stack backtrace: CPU: 0 UID: 0 PID: 8404 Comm: syz.2.735 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 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:4830 [inline] check_wait_context kernel/locking/lockdep.c:4902 [inline] __lock_acquire+0xfa4/0x2630 kernel/locking/lockdep.c:5187 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1b1/0x370 kernel/locking/lockdep.c:5825 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:174 [inline] _raw_read_lock_irqsave+0x46/0x90 kernel/locking/spinlock.c:240 kvm_xen_set_evtchn_fast+0x253/0xe80 arch/x86/kvm/xen.c:1819 xen_timer_callback+0x1db/0x2a0 arch/x86/kvm/xen.c:140 __run_hrtimer kernel/time/hrtimer.c:1930 [inline] __hrtimer_run_queues+0x142/0xa00 kernel/time/hrtimer.c:1994 hrtimer_interrupt+0x3e5/0x940 kernel/time/hrtimer.c:2113 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] __sysvec_apic_timer_interrupt+0x10b/0x460 arch/x86/kernel/apic/apic.c:1067 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0x9e/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0010:lock_is_held_type+0xf5/0x140 kernel/locking/lockdep.c:5945 Code: ff ff ff ff 65 0f c1 15 f1 b5 80 08 83 fa 01 8b 44 24 04 75 2d 9c 5a 80 e6 02 75 47 41 f7 c5 00 02 00 00 74 01 fb 48 83 c4 08 <5b> 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc e9 57 39 03 00 31 c0 RSP: 0018:ffffc90006fcfbb0 EFLAGS: 00000292 RAX: 0000000000000000 RBX: ffffffff8e7e5700 RCX: 0000000000000001 RDX: 0000000000000046 RSI: ffffffff8defc0c2 RDI: ffffffff8c1c3800 RBP: ffff888029cfca00 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffff R13: 0000000000000246 R14: 0000000000000000 R15: ffff888029cfca00 lock_is_held include/linux/lockdep.h:249 [inline] __might_resched+0x248/0x330 kernel/sched/core.c:9125 __might_fault+0x8b/0x140 mm/memory.c:7322 _inline_copy_from_user include/linux/uaccess.h:169 [inline] _copy_from_user+0x29/0xd0 lib/usercopy.c:18 copy_from_user include/linux/uaccess.h:223 [inline] restore_sigcontext+0xcd/0x6a0 arch/x86/kernel/signal_64.c:59 __do_sys_rt_sigreturn+0x229/0x2c0 arch/x86/kernel/signal_64.c:268 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff55a73e1d9 Code: 11 06 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 c7 c0 0f 00 00 00 0f 05 <0f> 1f 80 00 00 00 00 48 81 ec 48 01 00 00 49 89 d0 64 48 8b 0c 25 RSP: 002b:00007ffd91718380 EFLAGS: 00000246 ORIG_RAX: 000000000000000f RAX: ffffffffffffffda RBX: 000000000001ea35 RCX: 00007ff55a73e1d9 RDX: 00007ffd91718380 RSI: 00007ffd917184b0 RDI: 0000000000000011 RBP: 0000000000000032 R08: 0000000000000001 R09: 0000000000000000 R10: 00007ffd91719150 R11: 0000000000000246 R12: 00007ffd91719170 R13: 00007ff55aa15fac R14: 000000000001ea67 R15: 00007ffd91719150 ---------------- Code disassembly (best guess), 3 bytes skipped: 0: ff 65 0f jmp *0xf(%rbp) 3: c1 15 f1 b5 80 08 83 rcll $0x83,0x880b5f1(%rip) # 0x880b5fb a: fa cli b: 01 8b 44 24 04 75 add %ecx,0x75042444(%rbx) 11: 2d 9c 5a 80 e6 sub $0xe6805a9c,%eax 16: 02 75 47 add 0x47(%rbp),%dh 19: 41 f7 c5 00 02 00 00 test $0x200,%r13d 20: 74 01 je 0x23 22: fb sti 23: 48 83 c4 08 add $0x8,%rsp * 27: 5b pop %rbx <-- trapping instruction 28: 5d pop %rbp 29: 41 5c pop %r12 2b: 41 5d pop %r13 2d: 41 5e pop %r14 2f: 41 5f pop %r15 31: c3 ret 32: cc int3 33: cc int3 34: cc int3 35: cc int3 36: e9 57 39 03 00 jmp 0x33992 3b: 31 c0 xor %eax,%eax