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, &(0x7f0000000280)={r0, r0, 0xc, 0x0, 0x0, 0x9, 0x1, 0x1, 0x9, 0x9, 0x1, 0x1, 'syz1\x00'}) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r2, 0x400448ca, 0x0) [ 85.169383][ T5302] Bluetooth: hci0: command tx timeout [ 85.336084][ T5323] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.397215][ T5323] [ 85.398601][ T5323] ====================================================== [ 85.401976][ T5323] WARNING: possible circular locking dependency detected [ 85.405456][ T5323] syzkaller #0 Not tainted [ 85.407535][ T5323] ------------------------------------------------------ [ 85.410517][ T5323] syz.0.0/5323 is trying to acquire lock: [ 85.413081][ T5323] ffff88801bbc6840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 85.418799][ T5323] [ 85.418799][ T5323] but task is already holding lock: [ 85.422398][ T5323] ffff88801bbc6af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.426621][ T5323] [ 85.426621][ T5323] which lock already depends on the new lock. [ 85.426621][ T5323] [ 85.431173][ T5323] [ 85.431173][ T5323] the existing dependency chain (in reverse order) is: [ 85.435267][ T5323] [ 85.435267][ T5323] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.438632][ T5323] __mutex_lock+0x19f/0x1300 [ 85.440870][ T5323] l2cap_info_timeout+0x60/0xa0 [ 85.443231][ T5323] process_scheduled_works+0xb02/0x1830 [ 85.446198][ T5323] worker_thread+0xa50/0xfc0 [ 85.448570][ T5323] kthread+0x388/0x470 [ 85.450660][ T5323] ret_from_fork+0x51e/0xb90 [ 85.452933][ T5323] ret_from_fork_asm+0x1a/0x30 [ 85.455250][ T5323] [ 85.455250][ T5323] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.460565][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 85.463320][ T5323] lock_acquire+0xf0/0x2e0 [ 85.465772][ T5323] __flush_work+0x700/0xc50 [ 85.468029][ T5323] __cancel_work_sync+0xbe/0x110 [ 85.470550][ T5323] l2cap_conn_del+0x40f/0x5c0 [ 85.473323][ T5323] hci_conn_hash_flush+0x10d/0x260 [ 85.476496][ T5323] hci_dev_close_sync+0x821/0x10e0 [ 85.479007][ T5323] hci_dev_close+0x108/0x260 [ 85.481124][ T5323] sock_do_ioctl+0x101/0x320 [ 85.483392][ T5323] sock_ioctl+0x5c6/0x7f0 [ 85.485753][ T5323] __se_sys_ioctl+0xfc/0x170 [ 85.488916][ T5323] do_syscall_64+0x14d/0xf80 [ 85.491904][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.494998][ T5323] [ 85.494998][ T5323] other info that might help us debug this: [ 85.494998][ T5323] [ 85.499362][ T5323] Possible unsafe locking scenario: [ 85.499362][ T5323] [ 85.502653][ T5323] CPU0 CPU1 [ 85.505226][ T5323] ---- ---- [ 85.507498][ T5323] lock(&conn->lock#2); [ 85.509640][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.514635][ T5323] lock(&conn->lock#2); [ 85.517772][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.520813][ T5323] [ 85.520813][ T5323] *** DEADLOCK *** [ 85.520813][ T5323] [ 85.524597][ T5323] 5 locks held by syz.0.0/5323: [ 85.526851][ T5323] #0: ffff888012cbcec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x260 [ 85.531992][ T5323] #1: ffff888012cbc0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x10e0 [ 85.537454][ T5323] #2: ffffffff8fd5c3a8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 85.541801][ T5323] #3: ffff88801bbc6af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.545795][ T5323] #4: ffffffff8e7602e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 85.549711][ T5323] [ 85.549711][ T5323] stack backtrace: [ 85.552812][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.552838][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 85.552850][ T5323] Call Trace: [ 85.552859][ T5323] [ 85.552868][ T5323] dump_stack_lvl+0xe8/0x150 [ 85.552894][ T5323] print_circular_bug+0x2e1/0x300 [ 85.552921][ T5323] check_noncircular+0x12e/0x150 [ 85.552946][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 85.552968][ T5323] ? do_raw_spin_lock+0x12b/0x2f0 [ 85.552985][ T5323] ? do_raw_spin_unlock+0x4d/0x210 [ 85.552998][ T5323] lock_acquire+0xf0/0x2e0 [ 85.553022][ T5323] ? __flush_work+0x100/0xc50 [ 85.553044][ T5323] ? __flush_work+0x100/0xc50 [ 85.553063][ T5323] __flush_work+0x700/0xc50 [ 85.553084][ T5323] ? __flush_work+0x100/0xc50 [ 85.553103][ T5323] ? __flush_work+0x100/0xc50 [ 85.553122][ T5323] ? __pfx___flush_work+0x10/0x10 [ 85.553141][ T5323] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.553162][ T5323] ? __cancel_work_sync+0x5c/0x110 [ 85.553182][ T5323] __cancel_work_sync+0xbe/0x110 [ 85.553201][ T5323] l2cap_conn_del+0x40f/0x5c0 [ 85.553219][ T5323] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.553233][ T5323] hci_conn_hash_flush+0x10d/0x260 [ 85.553252][ T5323] hci_dev_close_sync+0x821/0x10e0 [ 85.553271][ T5323] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.553285][ T5323] ? lockdep_hardirqs_on+0x7a/0x110 [ 85.553305][ T5323] ? enable_work+0x1fd/0x230 [ 85.553325][ T5323] hci_dev_close+0x108/0x260 [ 85.553342][ T5323] sock_do_ioctl+0x101/0x320 [ 85.553359][ T5323] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.553371][ T5323] ? do_futex+0x395/0x420 [ 85.553394][ T5323] sock_ioctl+0x5c6/0x7f0 [ 85.553408][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 85.553422][ T5323] ? __fget_files+0x2a/0x420 [ 85.553442][ T5323] ? __fget_files+0x3a0/0x420 [ 85.553456][ T5323] ? __fget_files+0x2a/0x420 [ 85.553473][ T5323] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.553487][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 85.553499][ T5323] __se_sys_ioctl+0xfc/0x170 [ 85.553512][ T5323] do_syscall_64+0x14d/0xf80 [ 85.553530][ T5323] ? trace_irq_disable+0x3b/0x150 [ 85.553549][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.553562][ T5323] ? clear_bhb_loop+0x40/0x90 [ 85.553576][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.553589][ T5323] RIP: 0033:0x7f7d7d19c799 [ 85.553606][ T5323] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 [ 85.553618][ T5323] RSP: 002b:00007f7d7e01ffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.553636][ T5323] RAX: ffffffffffffffda RBX: 00007f7d7d415fa0 RCX: 00007f7d7d19c799 [ 85.553647][ T5323] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 85.553657][ T5323] RBP: 00007f7d7d232bd9 R08: 0000000000000000 R09: 0000000000000000 [ 85.553665][ T5323] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.553675][ T5323] R13: 00007f7d7d416038 R14: 00007f7d7d415fa0 R15: 00007fff62012b38 [ 85.553691][ T5323] [ 87.218028][ T5302] Bluetooth: hci0: command tx timeout [ 89.298576][ T5302] Bluetooth: hci0: command tx timeout [ 91.377992][ T5302] Bluetooth: hci0: command tx timeout [ 92.018938][ T9] cfg80211: failed to load regulatory.db