program: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r0, 0x4b32, 0x6) r1 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r1, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r2 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r2, 0x400448c8, &(0x7f00000000c0)={r1, r1, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r3 = socket$rds(0x15, 0x5, 0x0) setsockopt$SO_RDS_MSG_RXPATH_LATENCY(r3, 0x114, 0xa, &(0x7f0000000000)={0x2, "7bd8"}, 0x3) r4 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r4, 0x400448ca, 0x0) [ 76.022914][ T4671] Bluetooth: hci0: command tx timeout [ 76.230538][ T5320] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 76.394116][ T1313] ieee802154 phy0 wpan0: encryption failed: -22 [ 76.396838][ T1313] ieee802154 phy1 wpan1: encryption failed: -22 [ 76.999063][ T5321] [ 77.000627][ T5321] ====================================================== [ 77.004976][ T5321] WARNING: possible circular locking dependency detected [ 77.010981][ T5321] syzkaller #0 Not tainted [ 77.036589][ T5321] ------------------------------------------------------ [ 77.047651][ T5321] syz.0.0/5321 is trying to acquire lock: [ 77.058384][ T5321] ffff88803f5e5840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 77.063607][ T5321] [ 77.063607][ T5321] but task is already holding lock: [ 77.069765][ T5321] ffff88803f5e5b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 77.086818][ T5321] [ 77.086818][ T5321] which lock already depends on the new lock. [ 77.086818][ T5321] [ 77.091950][ T5321] [ 77.091950][ T5321] the existing dependency chain (in reverse order) is: [ 77.096098][ T5321] [ 77.096098][ T5321] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 77.099737][ T5321] lock_acquire+0x120/0x360 [ 77.111798][ T5321] __mutex_lock+0x187/0x1350 [ 77.114621][ T5321] l2cap_info_timeout+0x60/0xa0 [ 77.117504][ T5321] process_scheduled_works+0xae1/0x17b0 [ 77.120534][ T5321] worker_thread+0x8a0/0xda0 [ 77.139935][ T5321] kthread+0x711/0x8a0 [ 77.141935][ T5321] ret_from_fork+0x4bc/0x870 [ 77.144061][ T5321] ret_from_fork_asm+0x1a/0x30 [ 77.146241][ T5321] [ 77.146241][ T5321] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 77.157193][ T5321] validate_chain+0xb9b/0x2140 [ 77.161662][ T5321] __lock_acquire+0xab9/0xd20 [ 77.165637][ T5321] lock_acquire+0x120/0x360 [ 77.168146][ T5321] __flush_work+0x6b8/0xbc0 [ 77.171072][ T5321] __cancel_work_sync+0xbe/0x110 [ 77.173579][ T5321] l2cap_conn_del+0x4f0/0x680 [ 77.199733][ T5321] hci_conn_hash_flush+0x10d/0x230 [ 77.227957][ T5321] hci_dev_close_sync+0xaef/0x1330 [ 77.231094][ T5321] hci_dev_close+0x108/0x200 [ 77.234040][ T5321] sock_do_ioctl+0xdc/0x300 [ 77.237019][ T5321] sock_ioctl+0x576/0x790 [ 77.242088][ T5321] __se_sys_ioctl+0xfc/0x170 [ 77.244283][ T5321] do_syscall_64+0xfa/0xfa0 [ 77.246412][ T5321] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 77.258243][ T5321] [ 77.258243][ T5321] other info that might help us debug this: [ 77.258243][ T5321] [ 77.270313][ T5321] Possible unsafe locking scenario: [ 77.270313][ T5321] [ 77.273364][ T5321] CPU0 CPU1 [ 77.285349][ T5321] ---- ---- [ 77.287874][ T5321] lock(&conn->lock#2); [ 77.289992][ T5321] lock((work_completion)(&(&conn->info_timer)->work)); [ 77.294956][ T5321] lock(&conn->lock#2); [ 77.300337][ T5321] lock((work_completion)(&(&conn->info_timer)->work)); [ 77.303222][ T5321] [ 77.303222][ T5321] *** DEADLOCK *** [ 77.303222][ T5321] [ 77.307605][ T5321] 5 locks held by syz.0.0/5321: [ 77.311783][ T5321] #0: ffff888042fccdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 77.316668][ T5321] #1: ffff888042fcc0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 77.322053][ T5321] #2: ffffffff8f64af28 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 77.341677][ T5321] #3: ffff88803f5e5b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 77.345688][ T5321] #4: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 77.349908][ T5321] [ 77.349908][ T5321] stack backtrace: [ 77.352498][ T5321] CPU: 0 UID: 0 PID: 5321 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 77.352515][ T5321] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 77.352523][ T5321] Call Trace: [ 77.352531][ T5321] [ 77.352536][ T5321] dump_stack_lvl+0x189/0x250 [ 77.352555][ T5321] ? __pfx_dump_stack_lvl+0x10/0x10 [ 77.352567][ T5321] ? __pfx__printk+0x10/0x10 [ 77.352578][ T5321] ? print_lock_name+0xde/0x100 [ 77.352588][ T5321] print_circular_bug+0x2ee/0x310 [ 77.352602][ T5321] check_noncircular+0x134/0x160 [ 77.352618][ T5321] validate_chain+0xb9b/0x2140 [ 77.352632][ T5321] ? do_raw_spin_lock+0x121/0x290 [ 77.352643][ T5321] ? look_up_lock_class+0x74/0x170 [ 77.352660][ T5321] ? register_lock_class+0x51/0x320 [ 77.352676][ T5321] __lock_acquire+0xab9/0xd20 [ 77.352693][ T5321] ? __flush_work+0xd2/0xbc0 [ 77.352701][ T5321] lock_acquire+0x120/0x360 [ 77.352715][ T5321] ? __flush_work+0xd2/0xbc0 [ 77.352727][ T5321] ? _raw_spin_unlock_irq+0x23/0x50 [ 77.352742][ T5321] ? __flush_work+0xd2/0xbc0 [ 77.352751][ T5321] __flush_work+0x6b8/0xbc0 [ 77.352760][ T5321] ? __flush_work+0xd2/0xbc0 [ 77.352769][ T5321] ? __flush_work+0xd2/0xbc0 [ 77.352778][ T5321] ? __pfx___flush_work+0x10/0x10 [ 77.352788][ T5321] ? __pfx_wq_barrier_func+0x10/0x10 [ 77.352803][ T5321] ? __pfx___cancel_work+0x10/0x10 [ 77.352813][ T5321] ? hci_conn_drop+0x14d/0x280 [ 77.352826][ T5321] __cancel_work_sync+0xbe/0x110 [ 77.352837][ T5321] l2cap_conn_del+0x4f0/0x680 [ 77.352849][ T5321] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 77.352859][ T5321] hci_conn_hash_flush+0x10d/0x230 [ 77.352876][ T5321] hci_dev_close_sync+0xaef/0x1330 [ 77.352890][ T5321] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 77.352902][ T5321] ? do_raw_read_unlock+0x3d/0x80 [ 77.352913][ T5321] hci_dev_close+0x108/0x200 [ 77.352924][ T5321] sock_do_ioctl+0xdc/0x300 [ 77.352936][ T5321] ? __pfx_sock_do_ioctl+0x10/0x10 [ 77.352949][ T5321] sock_ioctl+0x576/0x790 [ 77.352960][ T5321] ? __pfx_sock_ioctl+0x10/0x10 [ 77.352969][ T5321] ? __fget_files+0x3a0/0x420 [ 77.352980][ T5321] ? __fget_files+0x2a/0x420 [ 77.352990][ T5321] ? bpf_lsm_file_ioctl+0x9/0x20 [ 77.353004][ T5321] ? __pfx_sock_ioctl+0x10/0x10 [ 77.353013][ T5321] __se_sys_ioctl+0xfc/0x170 [ 77.353028][ T5321] do_syscall_64+0xfa/0xfa0 [ 77.353038][ T5321] ? lockdep_hardirqs_on+0x9c/0x150 [ 77.353053][ T5321] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 77.353064][ T5321] ? clear_bhb_loop+0x60/0xb0 [ 77.353077][ T5321] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 77.353087][ T5321] RIP: 0033:0x7efcb258eec9 [ 77.353098][ T5321] 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 [ 77.353108][ T5321] RSP: 002b:00007efcb33f7038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 77.353122][ T5321] RAX: ffffffffffffffda RBX: 00007efcb27e6090 RCX: 00007efcb258eec9 [ 77.353130][ T5321] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000008 [ 77.353138][ T5321] RBP: 00007efcb2611f91 R08: 0000000000000000 R09: 0000000000000000 [ 77.353145][ T5321] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 77.353152][ T5321] R13: 00007efcb27e6128 R14: 00007efcb27e6090 R15: 00007fffa7b1e1c8 [ 77.353166][ T5321] [ 78.042506][ T5300] Bluetooth: hci0: command tx timeout [ 80.123307][ T5300] Bluetooth: hci0: command tx timeout [ 82.202490][ T5300] Bluetooth: hci0: command tx timeout