syzbot


possible deadlock in vmci_qp_broker_detach

Status: auto-obsoleted due to no activity on 2025/02/24 18:46
Reported-by: syzbot+0c684198271115ab86bc@syzkaller.appspotmail.com
First crash: 156d, last: 156d
Bug presence (1)
Date Name Commit Repro Result
2024/11/17 upstream (ToT) 4a5df3796467 C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in vmci_qp_broker_detach kernel C unreliable error 61 2d00h 1487d 0/28 upstream: reported C repro on 2021/03/26 01:19
linux-4.14 possible deadlock in vmci_qp_broker_detach C error 7 955d 1116d 0/1 upstream: reported C repro on 2022/04/01 16:43
linux-4.19 possible deadlock in vmci_qp_broker_detach C error 11 1081d 1575d 0/1 upstream: reported C repro on 2020/12/28 17:12

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.15.172-syzkaller #0 Not tainted
--------------------------------------------
syz.1.11633/28647 is trying to acquire lock:
ffffffff8d138638 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0xf1/0x1210 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

but task is already holding lock:
ffffffff8d138638 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0xf1/0x1210 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

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.1.11633/28647:
 #0: ffffffff8d138638 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0xf1/0x1210 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

stack backtrace:
CPU: 1 PID: 28647 Comm: syz.1.11633 Not tainted 5.15.172-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2946 [inline]
 check_deadlock kernel/locking/lockdep.c:2989 [inline]
 validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 vmci_qp_broker_detach+0xf1/0x1210 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095
 ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:444 [inline]
 kref_put include/linux/kref.h:65 [inline]
 vmci_ctx_put+0x7bf/0xe30 drivers/misc/vmw_vmci/vmci_context.c:497
 vmci_ctx_enqueue_datagram+0x38e/0x430 drivers/misc/vmw_vmci/vmci_context.c:360
 dg_dispatch_as_host drivers/misc/vmw_vmci/vmci_datagram.c:276 [inline]
 vmci_datagram_dispatch+0x43d/0xc10 drivers/misc/vmw_vmci/vmci_datagram.c:340
 qp_notify_peer drivers/misc/vmw_vmci/vmci_queue_pair.c:1481 [inline]
 vmci_qp_broker_detach+0xb54/0x1210 drivers/misc/vmw_vmci/vmci_queue_pair.c:2188
 ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:444 [inline]
 kref_put include/linux/kref.h:65 [inline]
 vmci_ctx_put+0x7bf/0xe30 drivers/misc/vmw_vmci/vmci_context.c:497
 vmci_host_close+0x97/0x160 drivers/misc/vmw_vmci/vmci_host.c:143
 __fput+0x3fe/0x8e0 fs/file_table.c:280
 task_work_run+0x129/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f19a0f7f719
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:00007ffe2eb49d78 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000053a71 RCX: 00007f19a0f7f719
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f19a1138a80 R08: 0000000000000001 R09: 00007ffe2eb4a06f
R10: 00007f19a0e01000 R11: 0000000000000246 R12: 0000000000053ab5
R13: 00007ffe2eb49e80 R14: 0000000000000032 R15: ffffffffffffffff
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/16 18:45 linux-5.15.y d98fd109f827 cfe3a04a .config console log report syz / log [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in vmci_qp_broker_detach
* Struck through repros no longer work on HEAD.