program: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) r1 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$inet6_tcp_TCP_MD5SIG(r1, 0x6, 0xe, &(0x7f0000000000)={@in6={{0xa, 0x0, 0x0, @loopback}}, 0x0, 0x0, 0x46, 0x0, "2431d0edd9b36cb74d7df7671eacf04be3b08353efa3641776f56c7556fd3713097bd0072577bc6fefb4cdc9e94e420b0ea4fbc5b07a32056eff5e6c42784b46ddab72b1b8fc87f208ad6db80d8dfe25"}, 0xd8) bind$inet6(r1, &(0x7f0000000100)={0xa, 0x4e22}, 0x1c) listen(r1, 0x0) syz_emit_ethernet(0x4b, &(0x7f0000000340)=ANY=[@ANYBLOB="aaaaaaaab4aaffffffffffff88470000030000000000000002006d1fe646170ef2039520b2e77a88a348120f26d9b2270ef0c59a9f57000337bc60ee24da6ef0d3c2a7e161627770f5d306c34cb2a87cf872dbfd3e9ed00b04982cd7a39f35f0107ff037ff39f6613ee670dc2914cfeb3d96d4548a5b51d953c761767a6672ba"], 0x0) r2 = open$dir(&(0x7f0000000180)='./file0\x00', 0x0, 0x100) fcntl$notify(r2, 0x402, 0x31) ioctl$KDSETLED(r0, 0x4b32, 0x6) r3 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r3, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r4 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r4, 0x400448c8, &(0x7f00000000c0)={r3, r3, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r5 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r6 = bpf$MAP_CREATE_TAIL_CALL(0x0, &(0x7f0000000540)={0x3, 0x4, 0x4, 0xa, 0x0, 0x0, 0x0, '\x00', 0x0, 0x0}, 0x48) bpf$PROG_LOAD(0x5, &(0x7f0000000280)={0x11, 0x9, &(0x7f0000000040)=@framed={{}, [@ldst={0x3, 0x0, 0x6, 0xa, 0x0, 0xfe00, 0x41}, @tail_call={{0x18, 0x2, 0x1, 0x0, r6}}]}, &(0x7f0000000000)='syzkaller\x00', 0x0, 0x0, 0x0, 0x40f00, 0x4, '\x00', 0x0, @fallback=0x34, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, 0x94) ioctl$KDSKBENT(0xffffffffffffffff, 0x4b47, &(0x7f0000000000)={0xf, 0x2}) ioctl$HCIINQUIRY(r5, 0x400448ca, 0x0) fchmod(r4, 0x100) [ 85.718823][ T4682] Bluetooth: hci0: command tx timeout [ 85.806666][ T5344] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.935905][ T5344] [ 85.937014][ T5344] ====================================================== [ 85.940116][ T5344] WARNING: possible circular locking dependency detected [ 85.943074][ T5344] syzkaller #0 Not tainted [ 85.944911][ T5344] ------------------------------------------------------ [ 85.947945][ T5344] syz.0.0/5344 is trying to acquire lock: [ 85.950495][ T5344] ffff88801185d840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.955209][ T5344] [ 85.955209][ T5344] but task is already holding lock: [ 85.957983][ T5344] ffff88801185db38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.961612][ T5344] [ 85.961612][ T5344] which lock already depends on the new lock. [ 85.961612][ T5344] [ 85.966069][ T5344] [ 85.966069][ T5344] the existing dependency chain (in reverse order) is: [ 85.969735][ T5344] [ 85.969735][ T5344] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.972704][ T5344] __mutex_lock+0x187/0x1350 [ 85.974876][ T5344] l2cap_info_timeout+0x60/0xa0 [ 85.977226][ T5344] process_scheduled_works+0xad1/0x1770 [ 85.980010][ T5344] worker_thread+0x8a0/0xda0 [ 85.982386][ T5344] kthread+0x711/0x8a0 [ 85.984484][ T5344] ret_from_fork+0x510/0xa50 [ 85.986665][ T5344] ret_from_fork_asm+0x1a/0x30 [ 85.988833][ T5344] [ 85.988833][ T5344] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.993070][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 85.995287][ T5344] lock_acquire+0x107/0x340 [ 85.997326][ T5344] __flush_work+0x6b8/0xbc0 [ 85.999599][ T5344] __cancel_work_sync+0xbe/0x110 [ 86.002036][ T5344] l2cap_conn_del+0x402/0x5b0 [ 86.004361][ T5344] hci_conn_hash_flush+0x10d/0x260 [ 86.006882][ T5344] hci_dev_close_sync+0x821/0x1100 [ 86.009446][ T5344] hci_dev_close+0x108/0x270 [ 86.011755][ T5344] sock_do_ioctl+0xdc/0x300 [ 86.014003][ T5344] sock_ioctl+0x576/0x790 [ 86.016229][ T5344] __se_sys_ioctl+0xfc/0x170 [ 86.018650][ T5344] do_syscall_64+0xec/0xf80 [ 86.020947][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.023871][ T5344] [ 86.023871][ T5344] other info that might help us debug this: [ 86.023871][ T5344] [ 86.028502][ T5344] Possible unsafe locking scenario: [ 86.028502][ T5344] [ 86.031782][ T5344] CPU0 CPU1 [ 86.034108][ T5344] ---- ---- [ 86.036562][ T5344] lock(&conn->lock#2); [ 86.038494][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.042751][ T5344] lock(&conn->lock#2); [ 86.045761][ T5344] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.048813][ T5344] [ 86.048813][ T5344] *** DEADLOCK *** [ 86.048813][ T5344] [ 86.052383][ T5344] 5 locks held by syz.0.0/5344: [ 86.054572][ T5344] #0: ffff88801a12cec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x270 [ 86.058531][ T5344] #1: ffff88801a12c0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x1100 [ 86.062330][ T5344] #2: ffffffff8f485c88 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 86.066021][ T5344] #3: ffff88801185db38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 86.069976][ T5344] #4: ffffffff8df41aa0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.073943][ T5344] [ 86.073943][ T5344] stack backtrace: [ 86.076657][ T5344] CPU: 0 UID: 0 PID: 5344 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.076671][ T5344] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.076679][ T5344] Call Trace: [ 86.076687][ T5344] [ 86.076694][ T5344] dump_stack_lvl+0xe8/0x150 [ 86.076712][ T5344] print_circular_bug+0x2e2/0x300 [ 86.076725][ T5344] check_noncircular+0x12e/0x150 [ 86.076739][ T5344] __lock_acquire+0x15a6/0x2cf0 [ 86.076751][ T5344] ? do_raw_spin_lock+0x121/0x290 [ 86.076767][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.076778][ T5344] lock_acquire+0x107/0x340 [ 86.076788][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.076807][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.076817][ T5344] __flush_work+0x6b8/0xbc0 [ 86.076830][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.076844][ T5344] ? __flush_work+0xd2/0xbc0 [ 86.076857][ T5344] ? __pfx___flush_work+0x10/0x10 [ 86.076871][ T5344] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.076887][ T5344] ? __cancel_work_sync+0x5c/0x110 [ 86.076901][ T5344] __cancel_work_sync+0xbe/0x110 [ 86.076914][ T5344] l2cap_conn_del+0x402/0x5b0 [ 86.076933][ T5344] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.076950][ T5344] hci_conn_hash_flush+0x10d/0x260 [ 86.076968][ T5344] hci_dev_close_sync+0x821/0x1100 [ 86.076984][ T5344] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.076997][ T5344] ? lockdep_hardirqs_on+0x7b/0x110 [ 86.077008][ T5344] ? enable_work+0x1e9/0x220 [ 86.077023][ T5344] hci_dev_close+0x108/0x270 [ 86.077039][ T5344] sock_do_ioctl+0xdc/0x300 [ 86.077054][ T5344] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.077068][ T5344] ? do_futex+0x395/0x420 [ 86.077085][ T5344] sock_ioctl+0x576/0x790 [ 86.077098][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 86.077108][ T5344] ? __fget_files+0x2a/0x420 [ 86.077119][ T5344] ? __fget_files+0x3a0/0x420 [ 86.077129][ T5344] ? __fget_files+0x2a/0x420 [ 86.077140][ T5344] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.077157][ T5344] ? __pfx_sock_ioctl+0x10/0x10 [ 86.077168][ T5344] __se_sys_ioctl+0xfc/0x170 [ 86.077182][ T5344] do_syscall_64+0xec/0xf80 [ 86.077192][ T5344] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.077203][ T5344] ? trace_irq_disable+0x37/0x100 [ 86.077217][ T5344] ? clear_bhb_loop+0x60/0xb0 [ 86.077229][ T5344] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.077241][ T5344] RIP: 0033:0x7fc4b678f7c9 [ 86.077252][ T5344] 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.077261][ T5344] RSP: 002b:00007fc4b7576038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.077273][ T5344] RAX: ffffffffffffffda RBX: 00007fc4b69e5fa0 RCX: 00007fc4b678f7c9 [ 86.077280][ T5344] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000008 [ 86.077286][ T5344] RBP: 00007fc4b6813f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.077292][ T5344] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.077299][ T5344] R13: 00007fc4b69e6038 R14: 00007fc4b69e5fa0 R15: 00007ffd46a8cbe8 [ 86.077312][ T5344] [ 87.771435][ T4682] Bluetooth: hci0: command tx timeout [ 89.850643][ T4682] Bluetooth: hci0: command tx timeout [ 91.698410][ T1360] cfg80211: failed to load regulatory.db [ 91.930525][ T4682] Bluetooth: hci0: command tx timeout