program: r0 = openat$vmci(0xffffffffffffff9c, &(0x7f0000000140), 0x2, 0x0) ioctl$IOCTL_VMCI_VERSION2(r0, 0x7a7, &(0x7f0000000040)=0x90000) ioctl$IOCTL_VMCI_INIT_CONTEXT(r0, 0x7a0, &(0x7f0000000000)={@local}) ioctl$IOCTL_VMCI_QUEUEPAIR_ALLOC(r0, 0x7a8, &(0x7f0000000540)={{@local, 0x2}, @hyper, 0x0, 0x76b, 0x5e, 0x0, 0x101, 0xfffffffc}) r1 = openat$vmci(0xffffffffffffff9c, &(0x7f0000000140), 0x2, 0x0) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r3 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r3, 0x4b32, 0x6) r4 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) mkdirat(0xffffffffffffff9c, &(0x7f0000000340)='./file1\x00', 0x0) mkdirat(0xffffffffffffff9c, &(0x7f0000000100)='./file0\x00', 0x0) mkdir(&(0x7f0000000300)='./bus\x00', 0x0) mount$overlay(0x0, &(0x7f00000000c0)='./bus\x00', &(0x7f0000000080), 0x0, &(0x7f0000000380)={[{@upperdir={'upperdir', 0x3d, './file1'}}, {@lowerdir={'lowerdir', 0x3d, './file0'}}, {@workdir={'workdir', 0x3d, './bus'}}]}) sync() connect$bt_l2cap(r4, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r5 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r5, 0x400448c8, &(0x7f00000000c0)={r4, r4, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) ioctl$sock_bt_hci(r2, 0x400448ca, 0x0) ioctl$AUTOFS_DEV_IOCTL_EXPIRE(0xffffffffffffffff, 0xc018937c, &(0x7f0000000080)={{0x1, 0x1, 0x18, 0xffffffffffffffff, {0x6}}, './file0\x00'}) ioctl$IOCTL_VMCI_VERSION2(r6, 0x7a7, &(0x7f0000000040)=0xb0000) ioctl$IOCTL_VMCI_QUEUEPAIR_ALLOC(r1, 0x7a8, &(0x7f0000000540)={{@hyper, 0x2}, @hyper, 0x0, 0x5, 0x5e}) [ 86.420615][ T5329] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.503564][ T5329] [ 86.504735][ T5329] ====================================================== [ 86.507677][ T5329] WARNING: possible circular locking dependency detected [ 86.510734][ T5329] syzkaller #0 Not tainted [ 86.512707][ T5329] ------------------------------------------------------ [ 86.515755][ T5329] syz.0.0/5329 is trying to acquire lock: [ 86.518255][ T5329] ffff888050819040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.523229][ T5329] [ 86.523229][ T5329] but task is already holding lock: [ 86.526344][ T5329] ffff888050819338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.529912][ T5329] [ 86.529912][ T5329] which lock already depends on the new lock. [ 86.529912][ T5329] [ 86.534294][ T5329] [ 86.534294][ T5329] the existing dependency chain (in reverse order) is: [ 86.537978][ T5329] [ 86.537978][ T5329] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.540372][ T5329] lock_acquire+0x120/0x360 [ 86.542128][ T5329] __mutex_lock+0x187/0x1350 [ 86.544278][ T5329] l2cap_info_timeout+0x60/0xa0 [ 86.546703][ T5329] process_scheduled_works+0xae1/0x17b0 [ 86.549222][ T5329] worker_thread+0x8a0/0xda0 [ 86.551398][ T5329] kthread+0x711/0x8a0 [ 86.553342][ T5329] ret_from_fork+0x4bc/0x870 [ 86.555619][ T5329] ret_from_fork_asm+0x1a/0x30 [ 86.557880][ T5329] [ 86.557880][ T5329] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.561896][ T5329] validate_chain+0xb9b/0x2140 [ 86.563955][ T5329] __lock_acquire+0xab9/0xd20 [ 86.566064][ T5329] lock_acquire+0x120/0x360 [ 86.567958][ T5329] __flush_work+0x6b8/0xbc0 [ 86.569904][ T5329] __cancel_work_sync+0xbe/0x110 [ 86.572293][ T5329] l2cap_conn_del+0x4f0/0x680 [ 86.574353][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 86.577087][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 86.579444][ T5329] hci_dev_close+0x108/0x200 [ 86.581509][ T5329] sock_do_ioctl+0xdc/0x300 [ 86.583545][ T5329] sock_ioctl+0x576/0x790 [ 86.585629][ T5329] __se_sys_ioctl+0xfc/0x170 [ 86.587936][ T5329] do_syscall_64+0xfa/0xfa0 [ 86.590173][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.592790][ T5329] [ 86.592790][ T5329] other info that might help us debug this: [ 86.592790][ T5329] [ 86.596408][ T5329] Possible unsafe locking scenario: [ 86.596408][ T5329] [ 86.599263][ T5329] CPU0 CPU1 [ 86.601265][ T5329] ---- ---- [ 86.603355][ T5329] lock(&conn->lock#2); [ 86.605102][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.609229][ T5329] lock(&conn->lock#2); [ 86.612240][ T5329] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.615333][ T5329] [ 86.615333][ T5329] *** DEADLOCK *** [ 86.615333][ T5329] [ 86.618809][ T5329] 5 locks held by syz.0.0/5329: [ 86.620790][ T5329] #0: ffff88803ec78dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.624271][ T5329] #1: ffff88803ec780b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.627641][ T5329] #2: ffffffff8f438668 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.631383][ T5329] #3: ffff888050819338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.634988][ T5329] #4: ffffffff8df3d6e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.638547][ T5329] [ 86.638547][ T5329] stack backtrace: [ 86.640752][ T5329] CPU: 0 UID: 0 PID: 5329 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.640762][ T5329] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.640767][ T5329] Call Trace: [ 86.640772][ T5329] [ 86.640776][ T5329] dump_stack_lvl+0x189/0x250 [ 86.640793][ T5329] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.640806][ T5329] ? __pfx__printk+0x10/0x10 [ 86.640817][ T5329] ? print_lock_name+0xde/0x100 [ 86.640827][ T5329] print_circular_bug+0x2ee/0x310 [ 86.640839][ T5329] check_noncircular+0x134/0x160 [ 86.640853][ T5329] validate_chain+0xb9b/0x2140 [ 86.640866][ T5329] ? do_raw_spin_lock+0x121/0x290 [ 86.640878][ T5329] ? look_up_lock_class+0x74/0x170 [ 86.640888][ T5329] ? register_lock_class+0x51/0x320 [ 86.640896][ T5329] __lock_acquire+0xab9/0xd20 [ 86.640904][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.640914][ T5329] lock_acquire+0x120/0x360 [ 86.640919][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.640928][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.640935][ T5329] __flush_work+0x6b8/0xbc0 [ 86.640942][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.640950][ T5329] ? __flush_work+0xd2/0xbc0 [ 86.640957][ T5329] ? __pfx___flush_work+0x10/0x10 [ 86.640965][ T5329] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.640973][ T5329] ? __pfx___cancel_work+0x10/0x10 [ 86.640981][ T5329] ? hci_conn_drop+0x14d/0x280 [ 86.640989][ T5329] __cancel_work_sync+0xbe/0x110 [ 86.640997][ T5329] l2cap_conn_del+0x4f0/0x680 [ 86.641008][ T5329] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.641017][ T5329] hci_conn_hash_flush+0x10d/0x230 [ 86.641026][ T5329] hci_dev_close_sync+0xaef/0x1330 [ 86.641036][ T5329] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.641045][ T5329] ? do_raw_read_unlock+0x3d/0x80 [ 86.641054][ T5329] hci_dev_close+0x108/0x200 [ 86.641068][ T5329] sock_do_ioctl+0xdc/0x300 [ 86.641081][ T5329] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.641096][ T5329] sock_ioctl+0x576/0x790 [ 86.641109][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 86.641120][ T5329] ? __fget_files+0x3a0/0x420 [ 86.641132][ T5329] ? __fget_files+0x2a/0x420 [ 86.641141][ T5329] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.641147][ T5329] ? __pfx_sock_ioctl+0x10/0x10 [ 86.641153][ T5329] __se_sys_ioctl+0xfc/0x170 [ 86.641161][ T5329] do_syscall_64+0xfa/0xfa0 [ 86.641171][ T5329] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.641180][ T5329] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.641186][ T5329] ? clear_bhb_loop+0x60/0xb0 [ 86.641195][ T5329] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.641205][ T5329] RIP: 0033:0x7f95a3f8f7c9 [ 86.641216][ T5329] 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 [ 86.641225][ T5329] RSP: 002b:00007f95a4e43038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.641237][ T5329] RAX: ffffffffffffffda RBX: 00007f95a41e5fa0 RCX: 00007f95a3f8f7c9 [ 86.641247][ T5329] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 86.641252][ T5329] RBP: 00007f95a4013f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.641257][ T5329] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.641261][ T5329] R13: 00007f95a41e6038 R14: 00007f95a41e5fa0 R15: 00007fff7d5696b8 [ 86.641268][ T5329] [ 86.783341][ T5304] Bluetooth: hci0: command tx timeout [ 86.786032][ T9] cfg80211: failed to load regulatory.db [ 88.800103][ T5304] Bluetooth: hci0: command tx timeout [ 90.880106][ T5304] Bluetooth: hci0: command tx timeout