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) r3 = socket$nl_generic(0x10, 0x3, 0x10) r4 = syz_genetlink_get_family_id$nl80211(&(0x7f0000000080), 0xffffffffffffffff) ioctl$sock_SIOCGIFINDEX_80211(r3, 0x8933, &(0x7f00000000c0)={'wlan1\x00', 0x0}) sendmsg$NL80211_CMD_SET_INTERFACE(r3, &(0x7f0000000100)={0x0, 0x0, &(0x7f0000000140)={&(0x7f0000000180)={0x24, r4, 0x5, 0x0, 0x0, {{}, {@val={0x8, 0x3, r5}, @void}}, [@NL80211_ATTR_IFTYPE={0x8, 0x5, 0x2}]}, 0x24}}, 0x0) sendmsg$NL80211_CMD_CONNECT(r3, &(0x7f00000001c0)={0x0, 0x0, &(0x7f0000000200)={&(0x7f0000000040)={0x2c, r4, 0x5, 0x0, 0x0, {{}, {@val={0x8, 0x3, r5}, @void}}, [@NL80211_ATTR_SSID={0xa, 0x34, @default_ap_ssid}, @NL80211_ATTR_DISABLE_HT={0x4}]}, 0x2c}}, 0x0) connect$bt_l2cap(r2, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r6 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r6, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) [ 85.699238][ T5329] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.806596][ T5330] [ 85.807705][ T5330] ====================================================== [ 85.810596][ T5330] WARNING: possible circular locking dependency detected [ 85.813610][ T5330] syzkaller #0 Not tainted [ 85.815519][ T5330] ------------------------------------------------------ [ 85.818509][ T5330] syz.0.0/5330 is trying to acquire lock: [ 85.820963][ T5330] ffff8880447a7840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.825902][ T5330] [ 85.825902][ T5330] but task is already holding lock: [ 85.829055][ T5330] ffff8880447a7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.832931][ T5330] [ 85.832931][ T5330] which lock already depends on the new lock. [ 85.832931][ T5330] [ 85.837289][ T5330] [ 85.837289][ T5330] the existing dependency chain (in reverse order) is: [ 85.841081][ T5330] [ 85.841081][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.844294][ T5330] lock_acquire+0x120/0x360 [ 85.846525][ T5330] __mutex_lock+0x187/0x1350 [ 85.848804][ T5330] l2cap_info_timeout+0x60/0xa0 [ 85.851119][ T5330] process_scheduled_works+0xae1/0x17b0 [ 85.853984][ T5330] worker_thread+0x8a0/0xda0 [ 85.856219][ T5330] kthread+0x711/0x8a0 [ 85.858274][ T5330] ret_from_fork+0x4bc/0x870 [ 85.860480][ T5330] ret_from_fork_asm+0x1a/0x30 [ 85.862830][ T5330] [ 85.862830][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.867313][ T5330] validate_chain+0xb9b/0x2140 [ 85.869586][ T5330] __lock_acquire+0xab9/0xd20 [ 85.871755][ T5330] lock_acquire+0x120/0x360 [ 85.873944][ T5330] __flush_work+0x6b8/0xbc0 [ 85.876152][ T5330] __cancel_work_sync+0xbe/0x110 [ 85.878435][ T5330] l2cap_conn_del+0x4f0/0x680 [ 85.880637][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 85.882961][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 85.885137][ T5330] hci_dev_close+0x108/0x200 [ 85.887267][ T5330] sock_do_ioctl+0xdc/0x300 [ 85.889361][ T5330] sock_ioctl+0x576/0x790 [ 85.891384][ T5330] __se_sys_ioctl+0xfc/0x170 [ 85.893560][ T5330] do_syscall_64+0xfa/0xfa0 [ 85.895802][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.898543][ T5330] [ 85.898543][ T5330] other info that might help us debug this: [ 85.898543][ T5330] [ 85.902614][ T5330] Possible unsafe locking scenario: [ 85.902614][ T5330] [ 85.905409][ T5330] CPU0 CPU1 [ 85.907569][ T5330] ---- ---- [ 85.909911][ T5330] lock(&conn->lock#2); [ 85.911772][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.915742][ T5330] lock(&conn->lock#2); [ 85.918552][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.921556][ T5330] [ 85.921556][ T5330] *** DEADLOCK *** [ 85.921556][ T5330] [ 85.924870][ T5330] 5 locks held by syz.0.0/5330: [ 85.927252][ T5330] #0: ffff88803a694dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 85.931840][ T5330] #1: ffff88803a6940b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 85.936190][ T5330] #2: ffffffff8f438668 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 85.940403][ T5330] #3: ffff8880447a7b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 85.944190][ T5330] #4: ffffffff8df3d6e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 85.947812][ T5330] [ 85.947812][ T5330] stack backtrace: [ 85.950127][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.950141][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 85.950148][ T5330] Call Trace: [ 85.950155][ T5330] [ 85.950161][ T5330] dump_stack_lvl+0x189/0x250 [ 85.950181][ T5330] ? __pfx_dump_stack_lvl+0x10/0x10 [ 85.950194][ T5330] ? __pfx__printk+0x10/0x10 [ 85.950205][ T5330] ? print_lock_name+0xde/0x100 [ 85.950215][ T5330] print_circular_bug+0x2ee/0x310 [ 85.950229][ T5330] check_noncircular+0x134/0x160 [ 85.950243][ T5330] validate_chain+0xb9b/0x2140 [ 85.950255][ T5330] ? do_raw_spin_lock+0x121/0x290 [ 85.950265][ T5330] ? look_up_lock_class+0x74/0x170 [ 85.950276][ T5330] ? register_lock_class+0x51/0x320 [ 85.950287][ T5330] __lock_acquire+0xab9/0xd20 [ 85.950297][ T5330] ? __flush_work+0xd2/0xbc0 [ 85.950309][ T5330] lock_acquire+0x120/0x360 [ 85.950317][ T5330] ? __flush_work+0xd2/0xbc0 [ 85.950331][ T5330] ? __flush_work+0xd2/0xbc0 [ 85.950340][ T5330] __flush_work+0x6b8/0xbc0 [ 85.950351][ T5330] ? __flush_work+0xd2/0xbc0 [ 85.950363][ T5330] ? __flush_work+0xd2/0xbc0 [ 85.950376][ T5330] ? __pfx___flush_work+0x10/0x10 [ 85.950388][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.950402][ T5330] ? __pfx___cancel_work+0x10/0x10 [ 85.950414][ T5330] ? hci_conn_drop+0x14d/0x280 [ 85.950423][ T5330] __cancel_work_sync+0xbe/0x110 [ 85.950431][ T5330] l2cap_conn_del+0x4f0/0x680 [ 85.950441][ T5330] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.950452][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 85.950462][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 85.950478][ T5330] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.950492][ T5330] ? do_raw_read_unlock+0x3d/0x80 [ 85.950505][ T5330] hci_dev_close+0x108/0x200 [ 85.950519][ T5330] sock_do_ioctl+0xdc/0x300 [ 85.950530][ T5330] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.950546][ T5330] sock_ioctl+0x576/0x790 [ 85.950559][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 85.950573][ T5330] ? __fget_files+0x3a0/0x420 [ 85.950588][ T5330] ? __fget_files+0x2a/0x420 [ 85.950600][ T5330] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.950609][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 85.950619][ T5330] __se_sys_ioctl+0xfc/0x170 [ 85.950631][ T5330] do_syscall_64+0xfa/0xfa0 [ 85.950646][ T5330] ? lockdep_hardirqs_on+0x9c/0x150 [ 85.950660][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.950668][ T5330] ? clear_bhb_loop+0x60/0xb0 [ 85.950680][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.950690][ T5330] RIP: 0033:0x7f6351d8f7c9 [ 85.950700][ 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 [ 85.950710][ T5330] RSP: 002b:00007f634e1f5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.950723][ T5330] RAX: ffffffffffffffda RBX: 00007f6351fe6090 RCX: 00007f6351d8f7c9 [ 85.950732][ T5330] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 85.950739][ T5330] RBP: 00007f6351e13f91 R08: 0000000000000000 R09: 0000000000000000 [ 85.950746][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.950753][ T5330] R13: 00007f6351fe6128 R14: 00007f6351fe6090 R15: 00007ffe7b4227e8 [ 85.950765][ T5330] [ 86.131712][ T4666] Bluetooth: hci0: command tx timeout [ 86.755225][ T9] cfg80211: failed to load regulatory.db [ 88.191899][ T4666] Bluetooth: hci0: command tx timeout [ 90.272213][ T4666] Bluetooth: hci0: command tx timeout