program: r0 = syz_init_net_socket$bt_l2cap(0x1f, 0x1, 0x3) connect(r0, &(0x7f0000000000)=@rc={0x1f, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x8}, 0x80) r1 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r1, 0x400448ca, 0x0) [ 86.196161][ T5328] [ 86.197220][ T5328] ====================================================== [ 86.200264][ T5328] WARNING: possible circular locking dependency detected [ 86.203350][ T5328] syzkaller #0 Not tainted [ 86.205318][ T5328] ------------------------------------------------------ [ 86.208647][ T5328] syz.0.0/5328 is trying to acquire lock: [ 86.211403][ T5328] ffff888045241040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.217240][ T5328] [ 86.217240][ T5328] but task is already holding lock: [ 86.220397][ T5328] ffff888045241338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.224308][ T5328] [ 86.224308][ T5328] which lock already depends on the new lock. [ 86.224308][ T5328] [ 86.228884][ T5328] [ 86.228884][ T5328] the existing dependency chain (in reverse order) is: [ 86.232964][ T5328] [ 86.232964][ T5328] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.236240][ T5328] lock_acquire+0x120/0x360 [ 86.238466][ T5328] __mutex_lock+0x187/0x1350 [ 86.240733][ T5328] l2cap_info_timeout+0x60/0xa0 [ 86.243104][ T5328] process_scheduled_works+0xae1/0x17b0 [ 86.245778][ T5328] worker_thread+0x8a0/0xda0 [ 86.248031][ T5328] kthread+0x711/0x8a0 [ 86.250033][ T5328] ret_from_fork+0x4bc/0x870 [ 86.252275][ T5328] ret_from_fork_asm+0x1a/0x30 [ 86.254556][ T5328] [ 86.254556][ T5328] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.258953][ T5328] validate_chain+0xb9b/0x2140 [ 86.261300][ T5328] __lock_acquire+0xab9/0xd20 [ 86.263576][ T5328] lock_acquire+0x120/0x360 [ 86.265783][ T5328] __flush_work+0x6b8/0xbc0 [ 86.267979][ T5328] __cancel_work_sync+0xbe/0x110 [ 86.270374][ T5328] l2cap_conn_del+0x4f0/0x680 [ 86.272656][ T5328] hci_conn_hash_flush+0x10d/0x230 [ 86.275094][ T5328] hci_dev_close_sync+0xaef/0x1330 [ 86.277446][ T5328] hci_dev_close+0x108/0x200 [ 86.279617][ T5328] sock_do_ioctl+0xdc/0x300 [ 86.281885][ T5328] sock_ioctl+0x576/0x790 [ 86.284010][ T5328] __se_sys_ioctl+0xfc/0x170 [ 86.286289][ T5328] do_syscall_64+0xfa/0xfa0 [ 86.288624][ T5328] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.291577][ T5328] [ 86.291577][ T5328] other info that might help us debug this: [ 86.291577][ T5328] [ 86.295996][ T5328] Possible unsafe locking scenario: [ 86.295996][ T5328] [ 86.299073][ T5328] CPU0 CPU1 [ 86.301509][ T5328] ---- ---- [ 86.303745][ T5328] lock(&conn->lock#2); [ 86.305631][ T5328] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.309337][ T5328] lock(&conn->lock#2); [ 86.312020][ T5328] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.314769][ T5328] [ 86.314769][ T5328] *** DEADLOCK *** [ 86.314769][ T5328] [ 86.317972][ T5328] 5 locks held by syz.0.0/5328: [ 86.319969][ T5328] #0: ffff88803de8cdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.324062][ T5328] #1: ffff88803de8c0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.328298][ T5328] #2: ffffffff8f437928 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.332585][ T5328] #3: ffff888045241338 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.336713][ T5328] #4: ffffffff8df3d620 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.340605][ T5328] [ 86.340605][ T5328] stack backtrace: [ 86.343169][ T5328] CPU: 0 UID: 0 PID: 5328 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.343186][ T5328] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.343196][ T5328] Call Trace: [ 86.343204][ T5328] [ 86.343210][ T5328] dump_stack_lvl+0x189/0x250 [ 86.343233][ T5328] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.343250][ T5328] ? __pfx__printk+0x10/0x10 [ 86.343264][ T5328] ? print_lock_name+0xde/0x100 [ 86.343278][ T5328] print_circular_bug+0x2ee/0x310 [ 86.343297][ T5328] check_noncircular+0x134/0x160 [ 86.343314][ T5328] validate_chain+0xb9b/0x2140 [ 86.343329][ T5328] ? do_raw_spin_lock+0x121/0x290 [ 86.343347][ T5328] ? look_up_lock_class+0x74/0x170 [ 86.343363][ T5328] ? register_lock_class+0x51/0x320 [ 86.343377][ T5328] __lock_acquire+0xab9/0xd20 [ 86.343397][ T5328] ? __flush_work+0xd2/0xbc0 [ 86.343412][ T5328] lock_acquire+0x120/0x360 [ 86.343424][ T5328] ? __flush_work+0xd2/0xbc0 [ 86.343440][ T5328] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.343455][ T5328] ? __flush_work+0xd2/0xbc0 [ 86.343470][ T5328] __flush_work+0x6b8/0xbc0 [ 86.343485][ T5328] ? __flush_work+0xd2/0xbc0 [ 86.343500][ T5328] ? __flush_work+0xd2/0xbc0 [ 86.343515][ T5328] ? __pfx___flush_work+0x10/0x10 [ 86.343527][ T5328] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.343542][ T5328] ? __pfx___cancel_work+0x10/0x10 [ 86.343557][ T5328] ? l2cap_conn_del+0x3db/0x680 [ 86.343577][ T5328] ? kfree+0x19a/0x6d0 [ 86.343589][ T5328] __cancel_work_sync+0xbe/0x110 [ 86.343605][ T5328] l2cap_conn_del+0x4f0/0x680 [ 86.343623][ T5328] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.343639][ T5328] hci_conn_hash_flush+0x10d/0x230 [ 86.343684][ T5328] hci_dev_close_sync+0xaef/0x1330 [ 86.343706][ T5328] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.343723][ T5328] ? do_raw_read_unlock+0x3d/0x80 [ 86.343743][ T5328] hci_dev_close+0x108/0x200 [ 86.343762][ T5328] sock_do_ioctl+0xdc/0x300 [ 86.343778][ T5328] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.343794][ T5328] sock_ioctl+0x576/0x790 [ 86.343807][ T5328] ? __pfx_sock_ioctl+0x10/0x10 [ 86.343820][ T5328] ? __fget_files+0x3a0/0x420 [ 86.343837][ T5328] ? __fget_files+0x2a/0x420 [ 86.343853][ T5328] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.343865][ T5328] ? __pfx_sock_ioctl+0x10/0x10 [ 86.343878][ T5328] __se_sys_ioctl+0xfc/0x170 [ 86.343893][ T5328] do_syscall_64+0xfa/0xfa0 [ 86.343908][ T5328] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.343923][ T5328] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.343935][ T5328] ? clear_bhb_loop+0x60/0xb0 [ 86.343949][ T5328] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.343961][ T5328] RIP: 0033:0x7fcd6ff8f6c9 [ 86.343974][ T5328] 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.343983][ T5328] RSP: 002b:00007fcd70d93038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.343998][ T5328] RAX: ffffffffffffffda RBX: 00007fcd701e6090 RCX: 00007fcd6ff8f6c9 [ 86.344008][ T5328] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000005 [ 86.344015][ T5328] RBP: 00007fcd70011f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.344024][ T5328] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.344031][ T5328] R13: 00007fcd701e6128 R14: 00007fcd701e6090 R15: 00007ffe67f07298 [ 86.344044][ T5328] [ 86.485353][ T4667] Bluetooth: hci0: command tx timeout [ 86.679106][ T9] cfg80211: failed to load regulatory.db [ 88.514832][ T4667] Bluetooth: hci0: command tx timeout [ 90.594739][ T4667] Bluetooth: hci0: command tx timeout