Context (ID=0x1) not attached to queue pair (handle=0x2:0x0) Context (ID=0x10) not attached to queue pair (handle=0x2:0x0) ============================================ WARNING: possible recursive locking detected 4.19.163-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/10709 is trying to acquire lock: 00000000878db8f2 (qp_broker_list.mutex){+.+.}, at: vmci_qp_broker_detach+0x147/0x11b0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2096 but task is already holding lock: 00000000878db8f2 (qp_broker_list.mutex){+.+.}, at: vmci_qp_broker_detach+0x147/0x11b0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2096 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(qp_broker_list.mutex); lock(qp_broker_list.mutex); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by syz-executor.1/10709: #0: 00000000878db8f2 (qp_broker_list.mutex){+.+.}, at: vmci_qp_broker_detach+0x147/0x11b0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2096 stack backtrace: CPU: 1 PID: 10709 Comm: syz-executor.1 Not tainted 4.19.163-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1763 [inline] check_deadlock kernel/locking/lockdep.c:1807 [inline] validate_chain kernel/locking/lockdep.c:2403 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xd7/0x1260 kernel/locking/mutex.c:1072 vmci_qp_broker_detach+0x147/0x11b0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2096 ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:452 [inline] kref_put include/linux/kref.h:70 [inline] vmci_ctx_put+0x55a/0xd60 drivers/misc/vmw_vmci/vmci_context.c:505 vmci_ctx_enqueue_datagram+0x3f7/0x500 drivers/misc/vmw_vmci/vmci_context.c:368 dg_dispatch_as_host drivers/misc/vmw_vmci/vmci_datagram.c:283 [inline] vmci_datagram_dispatch+0x39b/0xb40 drivers/misc/vmw_vmci/vmci_datagram.c:347 qp_notify_peer+0x182/0x260 drivers/misc/vmw_vmci/vmci_queue_pair.c:1485 vmci_qp_broker_detach+0xa09/0x11b0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2189 ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:452 [inline] kref_put include/linux/kref.h:70 [inline] vmci_ctx_put+0x55a/0xd60 drivers/misc/vmw_vmci/vmci_context.c:505 vmci_host_close+0x116/0x1a0 drivers/misc/vmw_vmci/vmci_host.c:147 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x417bf1 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 a4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007fff3f955350 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000417bf1 RDX: 0000001b2cb20000 RSI: ffffffff8820008d RDI: 0000000000000003 RBP: 0000000000000001 R08: ffffffff812cc51f R09: 000000006494ec27 R10: 00007fff3f955430 R11: 0000000000000293 R12: ffffffffffffffff R13: 00000000000bf5f1 R14: 00000000000003e8 R15: 000000000119bf8c