============================= [ BUG: Invalid wait context ] syzkaller #0 Not tainted ----------------------------- syz.4.107/6295 is trying to lock: ffff888057df1bc8 (&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.4.107/6295: 1, last CPU#0: #0: ffff888057df2118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:213 [inline] #0: ffff888057df2118 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:320 [inline] #0: ffff888057df2118 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x23b/0xd70 arch/x86/kvm/xen.c:1870 stack backtrace: CPU: 0 UID: 0 PID: 6295 Comm: syz.4.107 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:221 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 06 97 f8 f5 48 89 df e8 8e ed f8 f5 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 45 b6 e7 f5 65 48 83 3d 84 92 c9 09 00 74 16 5b RSP: 0018:ffffc90006727b10 EFLAGS: 00000246 RAX: 0000000000000006 RBX: ffff8880580c5c58 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff8e628089 RDI: ffffffff8c835380 RBP: 0000000000000296 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90006727bb8 R13: 0000000000000bb8 R14: 0000000000006c9f R15: ffff8880580c5c58 snd_rawmidi_write+0x4a0/0xd00 sound/core/rawmidi.c:1673 do_loop_readv_writev fs/read_write.c:851 [inline] do_loop_readv_writev fs/read_write.c:836 [inline] vfs_writev+0x5ed/0xdd0 fs/read_write.c:1060 do_writev+0x28a/0x340 fs/read_write.c:1104 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f416f79fb19 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:00007f417072b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f416fa26090 RCX: 00007f416f79fb19 RDX: 0000000000000002 RSI: 0000200000000900 RDI: 0000000000000008 RBP: 00007f416f837b70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f416fa26128 R14: 00007f416fa26090 R15: 00007ffe0dcd35c8 ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 06 97 f8 f5 call 0xf5f89719 13: 48 89 df mov %rbx,%rdi 16: e8 8e ed f8 f5 call 0xf5f8eda9 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 23 jne 0x46 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 37 jne 0x61 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 45 b6 e7 f5 call 0xf5e7b679 34: 65 48 83 3d 84 92 c9 cmpq $0x0,%gs:0x9c99284(%rip) # 0x9c992c1 3b: 09 00 3d: 74 16 je 0x55 3f: 5b pop %rbx