program: r0 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r0, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r1 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r1, 0x400448c8, &(0x7f0000000180)={r0, r0, 0x8, 0x0, 0x0, 0x82, 0x4a, 0x15c2, 0x5886, 0x6, 0x0, 0x8, 'syz1\x00'}) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r2, 0x400448ca, 0x0) [ 85.355998][ T4686] Bluetooth: hci0: command tx timeout [ 85.495287][ T5343] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.678104][ T5344] [ 85.679155][ T5344] ====================================================== [ 85.681843][ T5344] WARNING: possible circular locking dependency detected [ 85.684624][ T5344] syzkaller #0 Not tainted [ 85.686389][ T5344] ------------------------------------------------------ [ 85.689389][ T5344] syz.0.0/5344 is trying to acquire lock: [ 85.691742][ T5344] ffff888041628840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.696938][ T5344] [ 85.696938][ T5344] but task is already holding lock: [ 85.700540][ T5344] ffff888041628b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.704416][ T5344] [ 85.704416][ T5344] which lock already depends on the new lock. [ 85.704416][ T5344] [ 85.709452][ T5344] [ 85.709452][ T5344] the existing dependency chain (in reverse order) is: [ 85.713387][ T5344] [ 85.713387][ T5344] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.716901][ T5344] __mutex_lock+0x187/0x1350 [ 85.719195][ T5344] l2cap_info_timeout+0x60/0xa0 [ 85.721522][ T5344] process_scheduled_works+0xad1/0x1770 [ 85.724155][ T5344] worker_thread+0x8a0/0xda0 [ 85.726435][ T5344] kthread+0x711/0x8a0 [ 85.728535][ T5344] ret_from_fork+0x510/0xa50 [ 85.730809][ T5344] ret_from_fork_asm+0x1a/0x30 [ 85.733140][ T5344] [ 85.733140][ T5344] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.737472][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 85.739963][ T5344] lock_acquire+0x107/0x340 [ 85.742195][ T5344] __flush_work+0x6b8/0xbc0 [ 85.744261][ T5344] __cancel_work_sync+0xbe/0x110 [ 85.746682][ T5344] l2cap_conn_del+0x402/0x5b0 [ 85.748886][ T5344] hci_conn_hash_flush+0x10d/0x260 [ 85.751542][ T5344] hci_dev_close_sync+0x821/0x1100 [ 85.754019][ T5344] hci_dev_close+0x108/0x270 [ 85.756287][ T5344] sock_do_ioctl+0xdc/0x300 [ 85.758548][ T5344] sock_ioctl+0x576/0x790 [ 85.760754][ T5344] __se_sys_ioctl+0xfc/0x170 [ 85.763028][ T5344] do_syscall_64+0xec/0xf80 [ 85.765148][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.767913][ T5344] [ 85.767913][ T5344] other info that might help us debug this: [ 85.767913][ T5344] [ 85.772617][ T5344] Possible unsafe locking scenario: [ 85.772617][ T5344] [ 85.775794][ T5344] CPU0 CPU1 [ 85.778143][ T5344] ---- ---- [ 85.780408][ T5344] lock(&conn->lock#2); [ 85.782088][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.785880][ T5344] lock(&conn->lock#2); [ 85.788585][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.791607][ T5344] [ 85.791607][ T5344] *** DEADLOCK *** [ 85.791607][ T5344] [ 85.795117][ T5344] 5 locks held by syz.0.0/5344: [ 85.797310][ T5344] #0: ffff88803583cec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x270 [ 85.801483][ T5344] #1: ffff88803583c0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x1100 [ 85.805571][ T5344] #2: ffffffff8f485a48 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 85.809972][ T5344] #3: ffff888041628b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.814075][ T5344] #4: ffffffff8df41aa0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 85.818114][ T5344] [ 85.818114][ T5344] stack backtrace: [ 85.820727][ T5344] CPU: 0 UID: 0 PID: 5344 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.820744][ T5344] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 85.820752][ T5344] Call Trace: [ 85.820760][ T5344] [ 85.820767][ T5344] dump_stack_lvl+0xe8/0x150 [ 85.820788][ T5344] print_circular_bug+0x2e2/0x300 [ 85.820806][ T5344] check_noncircular+0x12e/0x150 [ 85.820822][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 85.820836][ T5344] ? do_raw_spin_lock+0x121/0x290 [ 85.820857][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.820869][ T5344] lock_acquire+0x107/0x340 [ 85.820879][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.820894][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.820906][ T5344] __flush_work+0x6b8/0xbc0 [ 85.820917][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.820929][ T5344] ? __flush_work+0xd2/0xbc0 [ 85.820938][ T5344] ? __pfx___flush_work+0x10/0x10 [ 85.820948][ T5344] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.820961][ T5344] ? __cancel_work_sync+0x5c/0x110 [ 85.820974][ T5344] __cancel_work_sync+0xbe/0x110 [ 85.820987][ T5344] l2cap_conn_del+0x402/0x5b0 [ 85.821004][ T5344] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.821020][ T5344] hci_conn_hash_flush+0x10d/0x260 [ 85.821038][ T5344] hci_dev_close_sync+0x821/0x1100 [ 85.821054][ T5344] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.821066][ T5344] ? lockdep_hardirqs_on+0x7b/0x110 [ 85.821077][ T5344] ? enable_work+0x1e9/0x220 [ 85.821089][ T5344] hci_dev_close+0x108/0x270 [ 85.821100][ T5344] sock_do_ioctl+0xdc/0x300 [ 85.821111][ T5344] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.821121][ T5344] ? do_futex+0x333/0x420 [ 85.821133][ T5344] ? call_rcu+0x644/0x890 [ 85.821148][ T5344] sock_ioctl+0x576/0x790 [ 85.821160][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 85.821170][ T5344] ? __fget_files+0x2a/0x420 [ 85.821180][ T5344] ? __fget_files+0x3a0/0x420 [ 85.821189][ T5344] ? __fget_files+0x2a/0x420 [ 85.821198][ T5344] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.821206][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 85.821215][ T5344] __se_sys_ioctl+0xfc/0x170 [ 85.821228][ T5344] do_syscall_64+0xec/0xf80 [ 85.821236][ T5344] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.821245][ T5344] ? trace_irq_disable+0x37/0x100 [ 85.821260][ T5344] ? clear_bhb_loop+0x60/0xb0 [ 85.821273][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.821284][ T5344] RIP: 0033:0x7fc17bb8f7c9 [ 85.821304][ T5344] 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 [ 85.821314][ T5344] RSP: 002b:00007fc17c9d0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.821327][ T5344] RAX: ffffffffffffffda RBX: 00007fc17bde6090 RCX: 00007fc17bb8f7c9 [ 85.821336][ T5344] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 85.821343][ T5344] RBP: 00007fc17bc13f91 R08: 0000000000000000 R09: 0000000000000000 [ 85.821350][ T5344] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.821357][ T5344] R13: 00007fc17bde6128 R14: 00007fc17bde6090 R15: 00007ffe82540418 [ 85.821370][ T5344] [ 87.400293][ T4686] Bluetooth: hci0: command tx timeout [ 89.480817][ T4686] Bluetooth: hci0: command tx timeout [ 91.559856][ T4686] Bluetooth: hci0: command tx timeout [ 91.804507][ T9] cfg80211: failed to load regulatory.db