program: r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) 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) r4 = syz_init_net_socket$ax25(0x3, 0x2, 0x81) getsockopt$ax25_int(r4, 0x101, 0x4, &(0x7f0000001280), &(0x7f00000012c0)=0x4) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) [ 86.054438][ T5322] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.415255][ T4665] Bluetooth: hci0: command tx timeout [ 86.445429][ T5323] [ 86.446655][ T5323] ====================================================== [ 86.462802][ T5323] WARNING: possible circular locking dependency detected [ 86.466042][ T5323] syzkaller #0 Not tainted [ 86.467879][ T5323] ------------------------------------------------------ [ 86.471021][ T5323] syz.0.0/5323 is trying to acquire lock: [ 86.474139][ T5323] ffff888011198840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.496507][ T5323] [ 86.496507][ T5323] but task is already holding lock: [ 86.499608][ T5323] ffff888011198b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.503772][ T5323] [ 86.503772][ T5323] which lock already depends on the new lock. [ 86.503772][ T5323] [ 86.508297][ T5323] [ 86.508297][ T5323] the existing dependency chain (in reverse order) is: [ 86.511647][ T5323] [ 86.511647][ T5323] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.514563][ T5323] lock_acquire+0x120/0x360 [ 86.516788][ T5323] __mutex_lock+0x187/0x1350 [ 86.535142][ T5323] l2cap_info_timeout+0x60/0xa0 [ 86.537608][ T5323] process_scheduled_works+0xae1/0x17b0 [ 86.540439][ T5323] worker_thread+0x8a0/0xda0 [ 86.542885][ T5323] kthread+0x711/0x8a0 [ 86.545053][ T5323] ret_from_fork+0x4bc/0x870 [ 86.547399][ T5323] ret_from_fork_asm+0x1a/0x30 [ 86.565361][ T5323] [ 86.565361][ T5323] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.570161][ T5323] validate_chain+0xb9b/0x2140 [ 86.572647][ T5323] __lock_acquire+0xab9/0xd20 [ 86.575145][ T5323] lock_acquire+0x120/0x360 [ 86.577546][ T5323] __flush_work+0x6b8/0xbc0 [ 86.591142][ T5323] __cancel_work_sync+0xbe/0x110 [ 86.592836][ T5323] l2cap_conn_del+0x4f0/0x680 [ 86.594844][ T5323] hci_conn_hash_flush+0x10d/0x230 [ 86.597172][ T5323] hci_dev_close_sync+0xaef/0x1330 [ 86.600443][ T5323] hci_dev_close+0x108/0x200 [ 86.603463][ T5323] sock_do_ioctl+0xdc/0x300 [ 86.607526][ T5323] sock_ioctl+0x576/0x790 [ 86.609586][ T5323] __se_sys_ioctl+0xfc/0x170 [ 86.611663][ T5323] do_syscall_64+0xfa/0xfa0 [ 86.613825][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.616892][ T5323] [ 86.616892][ T5323] other info that might help us debug this: [ 86.616892][ T5323] [ 86.622071][ T5323] Possible unsafe locking scenario: [ 86.622071][ T5323] [ 86.626282][ T5323] CPU0 CPU1 [ 86.629237][ T5323] ---- ---- [ 86.633299][ T5323] lock(&conn->lock#2); [ 86.637919][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.646700][ T5323] lock(&conn->lock#2); [ 86.652935][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.656527][ T5323] [ 86.656527][ T5323] *** DEADLOCK *** [ 86.656527][ T5323] [ 86.660409][ T5323] 5 locks held by syz.0.0/5323: [ 86.663208][ T5323] #0: ffff88801f570dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.667370][ T5323] #1: ffff88801f5700b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.672618][ T5323] #2: ffffffff8f438268 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.676847][ T5323] #3: ffff888011198b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.682431][ T5323] #4: ffffffff8df3d6e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.690435][ T5323] [ 86.690435][ T5323] stack backtrace: [ 86.694821][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.694842][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.694849][ T5323] Call Trace: [ 86.694856][ T5323] [ 86.694863][ T5323] dump_stack_lvl+0x189/0x250 [ 86.694883][ T5323] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.694898][ T5323] ? __pfx__printk+0x10/0x10 [ 86.694909][ T5323] ? print_lock_name+0xde/0x100 [ 86.694919][ T5323] print_circular_bug+0x2ee/0x310 [ 86.694933][ T5323] check_noncircular+0x134/0x160 [ 86.694946][ T5323] validate_chain+0xb9b/0x2140 [ 86.694958][ T5323] ? do_raw_spin_lock+0x121/0x290 [ 86.694974][ T5323] ? look_up_lock_class+0x74/0x170 [ 86.694996][ T5323] ? register_lock_class+0x51/0x320 [ 86.695012][ T5323] __lock_acquire+0xab9/0xd20 [ 86.695024][ T5323] ? __flush_work+0xd2/0xbc0 [ 86.695036][ T5323] lock_acquire+0x120/0x360 [ 86.695046][ T5323] ? __flush_work+0xd2/0xbc0 [ 86.695060][ T5323] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.695072][ T5323] ? __flush_work+0xd2/0xbc0 [ 86.695084][ T5323] __flush_work+0x6b8/0xbc0 [ 86.695095][ T5323] ? __flush_work+0xd2/0xbc0 [ 86.695108][ T5323] ? __flush_work+0xd2/0xbc0 [ 86.695119][ T5323] ? __pfx___flush_work+0x10/0x10 [ 86.695131][ T5323] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.695144][ T5323] ? __pfx___cancel_work+0x10/0x10 [ 86.695158][ T5323] ? hci_conn_drop+0x14d/0x280 [ 86.695171][ T5323] __cancel_work_sync+0xbe/0x110 [ 86.695184][ T5323] l2cap_conn_del+0x4f0/0x680 [ 86.695200][ T5323] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.695216][ T5323] hci_conn_hash_flush+0x10d/0x230 [ 86.695227][ T5323] hci_dev_close_sync+0xaef/0x1330 [ 86.695243][ T5323] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.695258][ T5323] ? do_raw_read_unlock+0x3d/0x80 [ 86.695284][ T5323] hci_dev_close+0x108/0x200 [ 86.695307][ T5323] sock_do_ioctl+0xdc/0x300 [ 86.695321][ T5323] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.695336][ T5323] sock_ioctl+0x576/0x790 [ 86.695348][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 86.695359][ T5323] ? __fget_files+0x3a0/0x420 [ 86.695372][ T5323] ? __fget_files+0x2a/0x420 [ 86.695387][ T5323] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.695398][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 86.695409][ T5323] __se_sys_ioctl+0xfc/0x170 [ 86.695422][ T5323] do_syscall_64+0xfa/0xfa0 [ 86.695437][ T5323] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.695451][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.695462][ T5323] ? clear_bhb_loop+0x60/0xb0 [ 86.695474][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.695485][ T5323] RIP: 0033:0x7f594b38f749 [ 86.695496][ T5323] 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.695505][ T5323] RSP: 002b:00007f594c19a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.695520][ T5323] RAX: ffffffffffffffda RBX: 00007f594b5e6090 RCX: 00007f594b38f749 [ 86.695528][ T5323] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 86.695536][ T5323] RBP: 00007f594b413f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.695543][ T5323] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.695549][ T5323] R13: 00007f594b5e6128 R14: 00007f594b5e6090 R15: 00007ffcd70e4f68 [ 86.695561][ T5323] [ 86.961747][ T9] cfg80211: failed to load regulatory.db [ 88.494011][ T5299] Bluetooth: hci0: command tx timeout [ 90.574323][ T5299] Bluetooth: hci0: command tx timeout