program: r0 = socket$nl_route(0x10, 0x3, 0x0) sendmsg$nl_route(r0, &(0x7f0000000040)={0x0, 0x0, &(0x7f0000000080)={&(0x7f00000000c0)=ANY=[@ANYBLOB="4c0000001000010800"/20, @ANYRES32=0x0, @ANYBLOB="000004001004000024001a80200002801c00018008001a00060000000800160002000000080008000004000008001b"], 0x4c}, 0x1, 0x0, 0x0, 0x20020001}, 0x10) syz_emit_ethernet(0x36, &(0x7f00000002c0)={@local, @link_local={0x1, 0x80, 0xc2, 0x0, 0x0, 0x1}, @void, {@ipv4={0x800, @tcp={{0x5, 0x4, 0x0, 0x0, 0x28, 0x65, 0x0, 0xf, 0x6, 0x0, @rand_addr=0x64010101, @local}, {{0x0, 0x4e22, 0x41424344, 0x41424344, 0x0, 0x6, 0x5, 0x2, 0xffff}}}}}}, 0x0) r1 = syz_init_net_socket$bt_l2cap(0x1f, 0x1, 0x3) connect(r1, &(0x7f0000000000)=@rc={0x1f, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x8}, 0x80) r2 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r2, 0x400448ca, 0x0) [ 86.424602][ T5330] [ 86.426042][ T5330] ====================================================== [ 86.429689][ T5330] WARNING: possible circular locking dependency detected [ 86.432628][ T5330] syzkaller #0 Not tainted [ 86.434609][ T5330] ------------------------------------------------------ [ 86.437799][ T5330] syz.0.0/5330 is trying to acquire lock: [ 86.440138][ T5330] ffff888044abd840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.445383][ T5330] [ 86.445383][ T5330] but task is already holding lock: [ 86.448658][ T5330] ffff888044abdb38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.452682][ T5330] [ 86.452682][ T5330] which lock already depends on the new lock. [ 86.452682][ T5330] [ 86.457061][ T5330] [ 86.457061][ T5330] the existing dependency chain (in reverse order) is: [ 86.460776][ T5330] [ 86.460776][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.464006][ T5330] lock_acquire+0x120/0x360 [ 86.466258][ T5330] __mutex_lock+0x187/0x1350 [ 86.468451][ T5330] l2cap_info_timeout+0x60/0xa0 [ 86.470801][ T5330] process_scheduled_works+0xae1/0x17b0 [ 86.473620][ T5330] worker_thread+0x8a0/0xda0 [ 86.475940][ T5330] kthread+0x711/0x8a0 [ 86.478628][ T5330] ret_from_fork+0x4bc/0x870 [ 86.481402][ T5330] ret_from_fork_asm+0x1a/0x30 [ 86.483569][ T5330] [ 86.483569][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.492705][ T5330] validate_chain+0xb9b/0x2140 [ 86.494955][ T5330] __lock_acquire+0xab9/0xd20 [ 86.497082][ T5330] lock_acquire+0x120/0x360 [ 86.499199][ T5330] __flush_work+0x6b8/0xbc0 [ 86.501385][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.503969][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.506307][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.508664][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 86.511107][ T5330] hci_dev_close+0x108/0x200 [ 86.513269][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.515357][ T5330] sock_ioctl+0x576/0x790 [ 86.517331][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.519442][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.521636][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.524124][ T5330] [ 86.524124][ T5330] other info that might help us debug this: [ 86.524124][ T5330] [ 86.528311][ T5330] Possible unsafe locking scenario: [ 86.528311][ T5330] [ 86.531514][ T5330] CPU0 CPU1 [ 86.533802][ T5330] ---- ---- [ 86.536116][ T5330] lock(&conn->lock#2); [ 86.537974][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.541885][ T5330] lock(&conn->lock#2); [ 86.544676][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.547776][ T5330] [ 86.547776][ T5330] *** DEADLOCK *** [ 86.547776][ T5330] [ 86.551137][ T5330] 5 locks held by syz.0.0/5330: [ 86.553356][ T5330] #0: ffff888040904dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.557461][ T5330] #1: ffff8880409040b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.561763][ T5330] #2: ffffffff8f64afa8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.566167][ T5330] #3: ffff888044abdb38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.570415][ T5330] #4: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.574590][ T5330] [ 86.574590][ T5330] stack backtrace: [ 86.577164][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.577181][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.577188][ T5330] Call Trace: [ 86.577197][ T5330] [ 86.577204][ T5330] dump_stack_lvl+0x189/0x250 [ 86.577221][ T5330] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.577233][ T5330] ? __pfx__printk+0x10/0x10 [ 86.577275][ T5330] ? print_lock_name+0xde/0x100 [ 86.577286][ T5330] print_circular_bug+0x2ee/0x310 [ 86.577304][ T5330] check_noncircular+0x134/0x160 [ 86.577323][ T5330] validate_chain+0xb9b/0x2140 [ 86.577339][ T5330] ? do_raw_spin_lock+0x121/0x290 [ 86.577353][ T5330] ? look_up_lock_class+0x74/0x170 [ 86.577369][ T5330] ? register_lock_class+0x51/0x320 [ 86.577378][ T5330] __lock_acquire+0xab9/0xd20 [ 86.577388][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.577394][ T5330] lock_acquire+0x120/0x360 [ 86.577402][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.577409][ T5330] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.577420][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.577425][ T5330] __flush_work+0x6b8/0xbc0 [ 86.577433][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.577442][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.577450][ T5330] ? __pfx___flush_work+0x10/0x10 [ 86.577459][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.577475][ T5330] ? __pfx___cancel_work+0x10/0x10 [ 86.577484][ T5330] ? hci_conn_drop+0x14d/0x280 [ 86.577497][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.577507][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.577518][ T5330] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.577529][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.577543][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 86.577556][ T5330] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.577567][ T5330] ? do_raw_read_unlock+0x3d/0x80 [ 86.577579][ T5330] hci_dev_close+0x108/0x200 [ 86.577589][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.577599][ T5330] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.577613][ T5330] sock_ioctl+0x576/0x790 [ 86.577622][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.577632][ T5330] ? __fget_files+0x3a0/0x420 [ 86.577644][ T5330] ? __fget_files+0x2a/0x420 [ 86.577656][ T5330] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.577669][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.577678][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.577689][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.577695][ T5330] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.577704][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.577711][ T5330] ? clear_bhb_loop+0x60/0xb0 [ 86.577718][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.577724][ T5330] RIP: 0033:0x7fcb7498eec9 [ 86.577742][ 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.577750][ T5330] RSP: 002b:00007fcb758b3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.577762][ T5330] RAX: ffffffffffffffda RBX: 00007fcb74be6090 RCX: 00007fcb7498eec9 [ 86.577770][ T5330] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000006 [ 86.577777][ T5330] RBP: 00007fcb74a11f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.577784][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.577790][ T5330] R13: 00007fcb74be6128 R14: 00007fcb74be6090 R15: 00007ffd2e3ea208 [ 86.577801][ T5330] [ 86.729678][ T10] cfg80211: failed to load regulatory.db [ 86.733393][ T4669] Bluetooth: hci0: command tx timeout [ 88.742973][ T4669] Bluetooth: hci0: command tx timeout [ 90.823237][ T4669] Bluetooth: hci0: command tx timeout