program: r0 = socket$l2tp(0x2, 0x2, 0x73) setsockopt$SO_BINDTODEVICE(r0, 0x1, 0x19, &(0x7f0000000240)='wlan0\x00', 0x10) r1 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r1, 0x4b32, 0x6) r2 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r2, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r3 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r4 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r4, 0x400448ca, 0x0) bind$inet(r0, &(0x7f0000000080)={0x2, 0x0, @remote}, 0x10) connect$inet(r0, &(0x7f0000000200)={0x2, 0x0, @local}, 0x10) sendmmsg$inet(r0, &(0x7f0000000900)=[{{0x0, 0x0, 0x0}}], 0x40000cf, 0x0) setsockopt$inet_opts(r0, 0x0, 0x1, &(0x7f0000000000)='I)A', 0x3) [ 87.511976][ T4683] Bluetooth: hci0: command tx timeout [ 87.681428][ T5345] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 88.542124][ T5346] [ 88.544290][ T5346] ====================================================== [ 88.548924][ T5346] WARNING: possible circular locking dependency detected [ 88.552335][ T5346] syzkaller #0 Not tainted [ 88.554362][ T5346] ------------------------------------------------------ [ 88.557502][ T5346] syz.0.0/5346 is trying to acquire lock: [ 88.560292][ T5346] ffff888032ee3840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 88.568105][ T5346] [ 88.568105][ T5346] but task is already holding lock: [ 88.572857][ T5346] ffff888032ee3b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 88.580031][ T5346] [ 88.580031][ T5346] which lock already depends on the new lock. [ 88.580031][ T5346] [ 88.589634][ T5346] [ 88.589634][ T5346] the existing dependency chain (in reverse order) is: [ 88.595394][ T5346] [ 88.595394][ T5346] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 88.602458][ T5346] __mutex_lock+0x187/0x1350 [ 88.610225][ T5346] l2cap_info_timeout+0x60/0xa0 [ 88.618791][ T5346] process_scheduled_works+0xad1/0x1770 [ 88.624456][ T5346] worker_thread+0x8a0/0xda0 [ 88.628967][ T5346] kthread+0x711/0x8a0 [ 88.632485][ T5346] ret_from_fork+0x510/0xa50 [ 88.638006][ T5346] ret_from_fork_asm+0x1a/0x30 [ 88.643296][ T5346] [ 88.643296][ T5346] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 88.659512][ T5346] __lock_acquire+0x15a6/0x2cf0 [ 88.664442][ T5346] lock_acquire+0x107/0x340 [ 88.670144][ T5346] __flush_work+0x6b8/0xbc0 [ 88.676175][ T5346] __cancel_work_sync+0xbe/0x110 [ 88.681152][ T5346] l2cap_conn_del+0x402/0x5b0 [ 88.686012][ T5346] hci_conn_hash_flush+0x10d/0x260 [ 88.691193][ T5346] hci_dev_close_sync+0x821/0x1100 [ 88.697644][ T5346] hci_dev_close+0x108/0x270 [ 88.701711][ T5346] sock_do_ioctl+0xdc/0x300 [ 88.707052][ T5346] sock_ioctl+0x576/0x790 [ 88.710151][ T5346] __se_sys_ioctl+0xfc/0x170 [ 88.713586][ T5346] do_syscall_64+0xec/0xf80 [ 88.719214][ T5346] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 88.724085][ T5346] [ 88.724085][ T5346] other info that might help us debug this: [ 88.724085][ T5346] [ 88.730594][ T5346] Possible unsafe locking scenario: [ 88.730594][ T5346] [ 88.739966][ T5346] CPU0 CPU1 [ 88.745417][ T5346] ---- ---- [ 88.754071][ T5346] lock(&conn->lock#2); [ 88.757422][ T5346] lock((work_completion)(&(&conn->info_timer)->work)); [ 88.763967][ T5346] lock(&conn->lock#2); [ 88.769002][ T5346] lock((work_completion)(&(&conn->info_timer)->work)); [ 88.775053][ T5346] [ 88.775053][ T5346] *** DEADLOCK *** [ 88.775053][ T5346] [ 88.780472][ T5346] 5 locks held by syz.0.0/5346: [ 88.783821][ T5346] #0: ffff888042dacec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x270 [ 88.790465][ T5346] #1: ffff888042dac0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x1100 [ 88.797583][ T5346] #2: ffffffff8f485c88 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 88.803774][ T5346] #3: ffff888032ee3b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 88.807962][ T5346] #4: ffffffff8df41aa0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 88.812267][ T5346] [ 88.812267][ T5346] stack backtrace: [ 88.815741][ T5346] CPU: 0 UID: 0 PID: 5346 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 88.815762][ T5346] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 88.815770][ T5346] Call Trace: [ 88.815819][ T5346] [ 88.815825][ T5346] dump_stack_lvl+0xe8/0x150 [ 88.815847][ T5346] print_circular_bug+0x2e2/0x300 [ 88.815905][ T5346] check_noncircular+0x12e/0x150 [ 88.815923][ T5346] __lock_acquire+0x15a6/0x2cf0 [ 88.815936][ T5346] ? do_raw_spin_lock+0x121/0x290 [ 88.815954][ T5346] ? __flush_work+0xd2/0xbc0 [ 88.816020][ T5346] lock_acquire+0x107/0x340 [ 88.816032][ T5346] ? __flush_work+0xd2/0xbc0 [ 88.816045][ T5346] ? __flush_work+0xd2/0xbc0 [ 88.816102][ T5346] __flush_work+0x6b8/0xbc0 [ 88.816116][ T5346] ? __flush_work+0xd2/0xbc0 [ 88.816129][ T5346] ? __flush_work+0xd2/0xbc0 [ 88.816143][ T5346] ? __pfx___flush_work+0x10/0x10 [ 88.816202][ T5346] ? __pfx_wq_barrier_func+0x10/0x10 [ 88.816220][ T5346] ? __cancel_work_sync+0x5c/0x110 [ 88.816234][ T5346] __cancel_work_sync+0xbe/0x110 [ 88.816294][ T5346] l2cap_conn_del+0x402/0x5b0 [ 88.816313][ T5346] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 88.816329][ T5346] hci_conn_hash_flush+0x10d/0x260 [ 88.816393][ T5346] hci_dev_close_sync+0x821/0x1100 [ 88.816409][ T5346] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 88.816464][ T5346] ? lockdep_hardirqs_on+0x7b/0x110 [ 88.816477][ T5346] ? enable_work+0x1e9/0x220 [ 88.816493][ T5346] hci_dev_close+0x108/0x270 [ 88.816510][ T5346] sock_do_ioctl+0xdc/0x300 [ 88.816570][ T5346] ? __pfx_sock_do_ioctl+0x10/0x10 [ 88.816584][ T5346] ? do_futex+0x333/0x420 [ 88.816594][ T5346] ? call_rcu+0x644/0x890 [ 88.816652][ T5346] sock_ioctl+0x576/0x790 [ 88.816667][ T5346] ? __pfx_sock_ioctl+0x10/0x10 [ 88.816680][ T5346] ? __fget_files+0x2a/0x420 [ 88.816693][ T5346] ? __fget_files+0x3a0/0x420 [ 88.816749][ T5346] ? __fget_files+0x2a/0x420 [ 88.816761][ T5346] ? bpf_lsm_file_ioctl+0x9/0x20 [ 88.816779][ T5346] ? __pfx_sock_ioctl+0x10/0x10 [ 88.816834][ T5346] __se_sys_ioctl+0xfc/0x170 [ 88.816850][ T5346] do_syscall_64+0xec/0xf80 [ 88.816864][ T5346] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 88.816875][ T5346] ? trace_irq_disable+0x37/0x100 [ 88.816936][ T5346] ? clear_bhb_loop+0x60/0xb0 [ 88.816950][ T5346] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 88.816961][ T5346] RIP: 0033:0x7f32ba78f7c9 [ 88.817039][ T5346] 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 [ 88.817050][ T5346] RSP: 002b:00007f32b6bf5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 88.817064][ T5346] RAX: ffffffffffffffda RBX: 00007f32ba9e6090 RCX: 00007f32ba78f7c9 [ 88.817072][ T5346] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000008 [ 88.817179][ T5346] RBP: 00007f32ba813f91 R08: 0000000000000000 R09: 0000000000000000 [ 88.817189][ T5346] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 88.817196][ T5346] R13: 00007f32ba9e6128 R14: 00007f32ba9e6090 R15: 00007ffd2fc67f28 [ 88.817209][ T5346] [ 89.568196][ T4683] Bluetooth: hci0: command tx timeout [ 91.648344][ T4683] Bluetooth: hci0: command tx timeout [ 91.814141][ T9] cfg80211: failed to load regulatory.db [ 93.728111][ T4683] Bluetooth: hci0: command tx timeout