program: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r0, 0x4b32, 0x5) 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 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r3, 0x400448ca, 0x0) [ 86.411167][ T5333] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.678901][ T10] cfg80211: failed to load regulatory.db [ 86.692910][ T5334] [ 86.694008][ T5334] ====================================================== [ 86.697006][ T5334] WARNING: possible circular locking dependency detected [ 86.700077][ T5334] syzkaller #0 Not tainted [ 86.701923][ T5334] ------------------------------------------------------ [ 86.705039][ T5334] syz.0.0/5334 is trying to acquire lock: [ 86.707396][ T5334] ffff888011aa4840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.712167][ T5334] [ 86.712167][ T5334] but task is already holding lock: [ 86.715170][ T5334] ffff888011aa4b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.719002][ T5334] [ 86.719002][ T5334] which lock already depends on the new lock. [ 86.719002][ T5334] [ 86.723351][ T5334] [ 86.723351][ T5334] the existing dependency chain (in reverse order) is: [ 86.727395][ T5334] [ 86.727395][ T5334] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.730620][ T5334] lock_acquire+0x120/0x360 [ 86.732790][ T5334] __mutex_lock+0x187/0x1350 [ 86.735188][ T5334] l2cap_info_timeout+0x60/0xa0 [ 86.737513][ T5334] process_scheduled_works+0xae1/0x17b0 [ 86.740114][ T5334] worker_thread+0x8a0/0xda0 [ 86.742288][ T5334] kthread+0x711/0x8a0 [ 86.744401][ T5334] ret_from_fork+0x4bc/0x870 [ 86.746651][ T5334] ret_from_fork_asm+0x1a/0x30 [ 86.748810][ T5334] [ 86.748810][ T5334] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.753105][ T5334] validate_chain+0xb9b/0x2140 [ 86.755479][ T5334] __lock_acquire+0xab9/0xd20 [ 86.757505][ T5334] lock_acquire+0x120/0x360 [ 86.759671][ T5334] __flush_work+0x6b8/0xbc0 [ 86.761840][ T5334] __cancel_work_sync+0xbe/0x110 [ 86.764583][ T5334] l2cap_conn_del+0x4f0/0x680 [ 86.767269][ T5334] hci_conn_hash_flush+0x10d/0x230 [ 86.769698][ T5334] hci_dev_close_sync+0xaef/0x1330 [ 86.772119][ T5334] hci_dev_close+0x108/0x200 [ 86.774348][ T5334] sock_do_ioctl+0xdc/0x300 [ 86.776633][ T5334] sock_ioctl+0x576/0x790 [ 86.778891][ T5334] __se_sys_ioctl+0xfc/0x170 [ 86.781172][ T5334] do_syscall_64+0xfa/0xfa0 [ 86.783407][ T5334] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.786107][ T5334] [ 86.786107][ T5334] other info that might help us debug this: [ 86.786107][ T5334] [ 86.790168][ T5334] Possible unsafe locking scenario: [ 86.790168][ T5334] [ 86.793139][ T5334] CPU0 CPU1 [ 86.795382][ T5334] ---- ---- [ 86.797668][ T5334] lock(&conn->lock#2); [ 86.799508][ T5334] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.803778][ T5334] lock(&conn->lock#2); [ 86.807439][ T5334] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.810570][ T5334] [ 86.810570][ T5334] *** DEADLOCK *** [ 86.810570][ T5334] [ 86.814411][ T5334] 5 locks held by syz.0.0/5334: [ 86.816652][ T5334] #0: ffff888000a44dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.820803][ T5334] #1: ffff888000a440b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.825100][ T5334] #2: ffffffff8f4371e8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.829610][ T5334] #3: ffff888011aa4b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.833489][ T5334] #4: ffffffff8df3d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.838256][ T5334] [ 86.838256][ T5334] stack backtrace: [ 86.841493][ T5334] CPU: 0 UID: 0 PID: 5334 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.841512][ T5334] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.841521][ T5334] Call Trace: [ 86.841529][ T5334] [ 86.841535][ T5334] dump_stack_lvl+0x189/0x250 [ 86.841557][ T5334] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.841573][ T5334] ? __pfx__printk+0x10/0x10 [ 86.841585][ T5334] ? print_lock_name+0xde/0x100 [ 86.841597][ T5334] print_circular_bug+0x2ee/0x310 [ 86.841614][ T5334] check_noncircular+0x134/0x160 [ 86.841629][ T5334] validate_chain+0xb9b/0x2140 [ 86.841642][ T5334] ? do_raw_spin_lock+0x121/0x290 [ 86.841655][ T5334] ? look_up_lock_class+0x74/0x170 [ 86.841668][ T5334] ? register_lock_class+0x51/0x320 [ 86.841681][ T5334] __lock_acquire+0xab9/0xd20 [ 86.841692][ T5334] ? __flush_work+0xd2/0xbc0 [ 86.841706][ T5334] lock_acquire+0x120/0x360 [ 86.841715][ T5334] ? __flush_work+0xd2/0xbc0 [ 86.841730][ T5334] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.841742][ T5334] ? __flush_work+0xd2/0xbc0 [ 86.841756][ T5334] __flush_work+0x6b8/0xbc0 [ 86.841769][ T5334] ? __flush_work+0xd2/0xbc0 [ 86.841782][ T5334] ? __flush_work+0xd2/0xbc0 [ 86.841796][ T5334] ? __pfx___flush_work+0x10/0x10 [ 86.841809][ T5334] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.841824][ T5334] ? __pfx___cancel_work+0x10/0x10 [ 86.841839][ T5334] ? hci_conn_drop+0x14d/0x280 [ 86.841852][ T5334] __cancel_work_sync+0xbe/0x110 [ 86.841867][ T5334] l2cap_conn_del+0x4f0/0x680 [ 86.841886][ T5334] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.841901][ T5334] hci_conn_hash_flush+0x10d/0x230 [ 86.841919][ T5334] hci_dev_close_sync+0xaef/0x1330 [ 86.841936][ T5334] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.841950][ T5334] ? do_raw_read_unlock+0x3d/0x80 [ 86.841967][ T5334] hci_dev_close+0x108/0x200 [ 86.841983][ T5334] sock_do_ioctl+0xdc/0x300 [ 86.841996][ T5334] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.842009][ T5334] sock_ioctl+0x576/0x790 [ 86.842022][ T5334] ? __pfx_sock_ioctl+0x10/0x10 [ 86.842033][ T5334] ? __fget_files+0x3a0/0x420 [ 86.842049][ T5334] ? __fget_files+0x2a/0x420 [ 86.842065][ T5334] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.842077][ T5334] ? __pfx_sock_ioctl+0x10/0x10 [ 86.842086][ T5334] __se_sys_ioctl+0xfc/0x170 [ 86.842100][ T5334] do_syscall_64+0xfa/0xfa0 [ 86.842114][ T5334] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.842128][ T5334] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.842141][ T5334] ? clear_bhb_loop+0x60/0xb0 [ 86.842155][ T5334] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.842166][ T5334] RIP: 0033:0x7f51a078efc9 [ 86.842179][ T5334] 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.842189][ T5334] RSP: 002b:00007f51a16d4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.842203][ T5334] RAX: ffffffffffffffda RBX: 00007f51a09e6090 RCX: 00007f51a078efc9 [ 86.842212][ T5334] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000007 [ 86.842220][ T5334] RBP: 00007f51a0811f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.842226][ T5334] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.842232][ T5334] R13: 00007f51a09e6128 R14: 00007f51a09e6090 R15: 00007ffe9d34bae8 [ 86.842244][ T5334] [ 87.017898][ T4672] Bluetooth: hci0: command tx timeout [ 89.057820][ T4672] Bluetooth: hci0: command tx timeout [ 91.138148][ T4672] Bluetooth: hci0: command tx timeout