program: r0 = syz_init_net_socket$bt_l2cap(0x1f, 0x3, 0x0) connect$bt_l2cap(r0, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x803}, 0xe) syz_emit_vhci(&(0x7f0000000340)=ANY=[@ANYBLOB="02c82028002400010007d3040007c4faff020c04000300d3"], 0x2d) r1 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r2 = openat$rfkill(0xffffffffffffff9c, &(0x7f0000000040), 0x801, 0x0) write$rfkill(r2, &(0x7f0000000080)={0x0, 0x0, 0x3, 0x1}, 0x8) madvise(&(0x7f0000000000/0x400000)=nil, 0x400000, 0xc) perf_event_open(&(0x7f00000000c0)={0x2, 0x80, 0xde, 0x1, 0x0, 0x0, 0x0, 0x0, 0x90414, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9a3, 0x0, @perf_config_ext={0xc1a0, 0x8}, 0x0, 0x82, 0xffffffff, 0x0, 0x6, 0x87c, 0x1, 0x0, 0x0, 0x0, 0x2}, 0x0, 0x4000000000, 0xffffffffffffffff, 0x0) syz_clone(0x0, 0x0, 0x0, 0x0, 0x0, 0x0) syz_usb_connect(0x0, 0x3f, 0x0, 0x0) ioctl$HCIINQUIRY(r1, 0x400448ca, 0x0) r3 = userfaultfd(0x80001) ioctl$UFFDIO_API(r3, 0xc018aa3f, &(0x7f00000000c0)) ioctl$UFFDIO_REGISTER(r3, 0xc020aa00, &(0x7f0000000080)={{&(0x7f0000ffd000/0x3000)=nil, 0x3000}, 0x1}) mremap(&(0x7f0000ffc000/0x2000)=nil, 0x2000, 0x2000, 0x7, &(0x7f0000fff000/0x1000)=nil) [ 85.868402][ T5330] [ 85.870756][ T5330] ====================================================== [ 85.875511][ T5330] WARNING: possible circular locking dependency detected [ 85.879025][ T5330] syzkaller #0 Not tainted [ 85.881291][ T5330] ------------------------------------------------------ [ 85.885380][ T5330] syz.0.0/5330 is trying to acquire lock: [ 85.887861][ T5330] ffff888042794840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.894394][ T5330] [ 85.894394][ T5330] but task is already holding lock: [ 85.897684][ T5330] ffff888042794b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.901664][ T5330] [ 85.901664][ T5330] which lock already depends on the new lock. [ 85.901664][ T5330] [ 85.906175][ T5330] [ 85.906175][ T5330] the existing dependency chain (in reverse order) is: [ 85.910165][ T5330] [ 85.910165][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.913716][ T5330] lock_acquire+0x120/0x360 [ 85.915834][ T5330] __mutex_lock+0x187/0x1350 [ 85.918063][ T5330] l2cap_info_timeout+0x60/0xa0 [ 85.920319][ T5330] process_scheduled_works+0xae1/0x17b0 [ 85.922769][ T5330] worker_thread+0x8a0/0xda0 [ 85.924949][ T5330] kthread+0x711/0x8a0 [ 85.926825][ T5330] ret_from_fork+0x4bc/0x870 [ 85.928943][ T5330] ret_from_fork_asm+0x1a/0x30 [ 85.931059][ T5330] [ 85.931059][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.935469][ T5330] validate_chain+0xb9b/0x2140 [ 85.937693][ T5330] __lock_acquire+0xab9/0xd20 [ 85.939963][ T5330] lock_acquire+0x120/0x360 [ 85.941961][ T5330] __flush_work+0x6b8/0xbc0 [ 85.944156][ T5330] __cancel_work_sync+0xbe/0x110 [ 85.947558][ T5330] l2cap_conn_del+0x4f0/0x680 [ 85.951308][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 85.953917][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 85.956310][ T5330] hci_dev_close+0x108/0x200 [ 85.958565][ T5330] sock_do_ioctl+0xdc/0x300 [ 85.960620][ T5330] sock_ioctl+0x576/0x790 [ 85.962692][ T5330] __se_sys_ioctl+0xfc/0x170 [ 85.965060][ T5330] do_syscall_64+0xfa/0xfa0 [ 85.967296][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.970009][ T5330] [ 85.970009][ T5330] other info that might help us debug this: [ 85.970009][ T5330] [ 85.974332][ T5330] Possible unsafe locking scenario: [ 85.974332][ T5330] [ 85.977545][ T5330] CPU0 CPU1 [ 85.979762][ T5330] ---- ---- [ 85.982108][ T5330] lock(&conn->lock#2); [ 85.984169][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.988844][ T5330] lock(&conn->lock#2); [ 85.991880][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.995378][ T5330] [ 85.995378][ T5330] *** DEADLOCK *** [ 85.995378][ T5330] [ 85.998610][ T5330] 5 locks held by syz.0.0/5330: [ 86.000581][ T5330] #0: ffff8880375fcdc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.004330][ T5330] #1: ffff8880375fc0b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.008262][ T5330] #2: ffffffff8f64afa8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.012651][ T5330] #3: ffff888042794b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.016771][ T5330] #4: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.020725][ T5330] [ 86.020725][ T5330] stack backtrace: [ 86.023330][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.023347][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.023355][ T5330] Call Trace: [ 86.023364][ T5330] [ 86.023370][ T5330] dump_stack_lvl+0x189/0x250 [ 86.023388][ T5330] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.023401][ T5330] ? __pfx__printk+0x10/0x10 [ 86.023415][ T5330] ? print_lock_name+0xde/0x100 [ 86.023427][ T5330] print_circular_bug+0x2ee/0x310 [ 86.023446][ T5330] check_noncircular+0x134/0x160 [ 86.023466][ T5330] validate_chain+0xb9b/0x2140 [ 86.023484][ T5330] ? do_raw_spin_lock+0x121/0x290 [ 86.023499][ T5330] ? look_up_lock_class+0x74/0x170 [ 86.023516][ T5330] ? register_lock_class+0x51/0x320 [ 86.023531][ T5330] __lock_acquire+0xab9/0xd20 [ 86.023547][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.023557][ T5330] lock_acquire+0x120/0x360 [ 86.023571][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.023582][ T5330] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.023600][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.023609][ T5330] __flush_work+0x6b8/0xbc0 [ 86.023618][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.023628][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.023640][ T5330] ? __pfx___flush_work+0x10/0x10 [ 86.023648][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.023666][ T5330] ? __pfx___cancel_work+0x10/0x10 [ 86.023677][ T5330] ? l2cap_conn_del+0x3db/0x680 [ 86.023690][ T5330] ? kfree+0x19a/0x6d0 [ 86.023705][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.023716][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.023729][ T5330] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.023742][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.023757][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 86.023770][ T5330] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.023783][ T5330] ? do_raw_read_unlock+0x3d/0x80 [ 86.023795][ T5330] hci_dev_close+0x108/0x200 [ 86.023807][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.023820][ T5330] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.023841][ T5330] sock_ioctl+0x576/0x790 [ 86.023853][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.023866][ T5330] ? __fget_files+0x3a0/0x420 [ 86.023878][ T5330] ? __fget_files+0x2a/0x420 [ 86.023890][ T5330] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.023905][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.023915][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.023930][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.023940][ T5330] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.023956][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.023967][ T5330] ? clear_bhb_loop+0x60/0xb0 [ 86.023979][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.023990][ T5330] RIP: 0033:0x7fe37498eec9 [ 86.024004][ T5330] 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.024014][ T5330] RSP: 002b:00007fe3758cd038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.024025][ T5330] RAX: ffffffffffffffda RBX: 00007fe374be6090 RCX: 00007fe37498eec9 [ 86.024034][ T5330] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000005 [ 86.024041][ T5330] RBP: 00007fe374a11f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.024050][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.024057][ T5330] R13: 00007fe374be6128 R14: 00007fe374be6090 R15: 00007ffff8c805c8 [ 86.024069][ T5330] [ 86.186942][ T4670] Bluetooth: hci0: command tx timeout [ 86.657615][ T789] cfg80211: failed to load regulatory.db [ 88.251582][ T4670] Bluetooth: hci0: command tx timeout [ 90.331760][ T4670] Bluetooth: hci0: command tx timeout