============================= [ BUG: Invalid wait context ] syzkaller #0 Not tainted ----------------------------- syz.0.0/5320 is trying to lock: ffff888052285bb0 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x1f4/0x9a0 arch/x86/kvm/xen.c:1822 other info that might help us debug this: context-{2:2} 3 locks held by syz.0.0/5320: #0: ffff888011d2ac90 (&sb->s_type->i_mutex_key#9/2){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline] #0: ffff888011d2ac90 (&sb->s_type->i_mutex_key#9/2){+.+.}-{4:4}, at: __simple_recursive_removal+0x19a/0x520 fs/libfs.c:619 #1: ffff8880122b1270 (&lockref->lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:342 [inline] #1: ffff8880122b1270 (&lockref->lock){+.+.}-{3:3}, at: dentry_kill+0x27f/0x880 fs/dcache.c:837 #2: ffff888052286110 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:187 [inline] #2: ffff888052286110 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:294 [inline] #2: ffff888052286110 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1bc/0x9a0 arch/x86/kvm/xen.c:1820 stack backtrace: CPU: 0 UID: 0 PID: 5320 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 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+0xe39/0x2cf0 kernel/locking/lockdep.c:5187 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:174 [inline] _raw_read_lock_irqsave+0x48/0x60 kernel/locking/spinlock.c:240 kvm_xen_set_evtchn_fast+0x1f4/0x9a0 arch/x86/kvm/xen.c:1822 xen_timer_callback+0x109/0x220 arch/x86/kvm/xen.c:140 __run_hrtimer kernel/time/hrtimer.c:2032 [inline] __hrtimer_run_queues+0x371/0xa10 kernel/time/hrtimer.c:2096 hrtimer_interrupt+0x448/0x910 kernel/time/hrtimer.c:2215 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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198 Code: f7 e8 2d ed cd f5 f7 c3 00 02 00 00 74 05 e8 e0 dd f9 f5 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 c4 00 bf f5 65 8b 05 bd 00 98 07 85 c0 74 18 5b 41 5e c3 cc cc RSP: 0018:ffffc9000de4fa70 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000286 RCX: 0000000080000002 RDX: 0000000000000006 RSI: ffffffff8e22bc06 RDI: 0000000000000001 RBP: ffff8880432d3a90 R08: ffffffff90576d37 R09: 1ffffffff20aeda6 R10: dffffc0000000000 R11: fffffbfff20aeda7 R12: ffffffff8bee2850 R13: ffff8880432d3a80 R14: ffffffff9aa8aed8 R15: 1ffff1100865a752 debug_object_activate+0x2ec/0x420 lib/debugobjects.c:891 debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline] __call_rcu_common kernel/rcu/tree.c:3144 [inline] call_rcu+0x43/0x8b0 kernel/rcu/tree.c:3279 dentry_kill+0x4d3/0x880 fs/dcache.c:845 finish_dput+0x1a/0x260 fs/dcache.c:1001 find_next_child+0x1e7/0x250 fs/libfs.c:592 __simple_recursive_removal+0x10b/0x520 fs/libfs.c:609 debugfs_remove+0x5b/0x70 fs/debugfs/inode.c:781 kvm_destroy_vm_debugfs virt/kvm/kvm_main.c:988 [inline] kvm_destroy_vm virt/kvm/kvm_main.c:1261 [inline] kvm_put_kvm+0x147/0xb50 virt/kvm/kvm_main.c:1331 kvm_vm_release+0x43/0x50 virt/kvm/kvm_main.c:1354 __fput+0x418/0xa50 fs/file_table.c:512 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x1fa/0x730 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f011819e0d9 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:00007ffc46862318 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007ffc46862400 RCX: 00007f011819e0d9 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 000000000001913e R08: 0000000000000001 R09: 0000000000000000 R10: 00007f0117fff030 R11: 0000000000000246 R12: 00007ffc46862440 R13: 00007f0118425fac R14: 0000000000019253 R15: 00007f0118425fa0 ---------------- Code disassembly (best guess): 0: f7 e8 imul %eax 2: 2d ed cd f5 f7 sub $0xf7f5cded,%eax 7: c3 ret 8: 00 02 add %al,(%rdx) a: 00 00 add %al,(%rax) c: 74 05 je 0x13 e: e8 e0 dd f9 f5 call 0xf5f9ddf3 13: 9c pushf 14: 58 pop %rax 15: a9 00 02 00 00 test $0x200,%eax 1a: 75 27 jne 0x43 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 c4 00 bf f5 call 0xf5bf00f3 <-- trapping instruction 2f: 65 8b 05 bd 00 98 07 mov %gs:0x79800bd(%rip),%eax # 0x79800f3 36: 85 c0 test %eax,%eax 38: 74 18 je 0x52 3a: 5b pop %rbx 3b: 41 5e pop %r14 3d: c3 ret 3e: cc int3 3f: cc int3