program: syz_open_dev$usbmon(&(0x7f0000000080), 0x0, 0x0) r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) syz_open_dev$tty1(0xc, 0x4, 0x2) ioctl$KDSETLED(r0, 0x4b32, 0x6) 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) r3 = syz_clone(0x28c0080, 0x0, 0x56, 0x0, 0x0, 0x0) ptrace(0x10, r3) ptrace$setsig(0x4203, r3, 0x0, &(0x7f0000000280)={0x3, 0x0, 0x1}) ioctl$sock_bt_hidp_HIDPCONNADD(r2, 0x400448c8, &(0x7f00000000c0)={r1, r1, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r4 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r4, 0x400448ca, 0x0) syz_usb_connect(0x0, 0x3f, &(0x7f00000001c0)=ANY=[@ANYBLOB="11010000733336088dee1edb23610000000109022d0101100000000904000003fe03010009cd8d1f0002000000090505", @ANYRESDEC], 0x0) r5 = syz_open_dev$usbfs(&(0x7f0000000180), 0x10000001d, 0x8041) ioctl$USBDEVFS_SUBMITURB(r5, 0x8038550a, &(0x7f0000000240)=@urb_type_iso={0x0, {0x5}, 0x3, 0x80, 0x0, 0x0, 0x2, 0x6512c6de, 0x4, 0xc, 0x100, 0x0}) [ 86.102197][ T5329] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 86.285978][ T5330] [ 86.287134][ T5330] ====================================================== [ 86.290116][ T5330] WARNING: possible circular locking dependency detected [ 86.293086][ T5330] syzkaller #0 Not tainted [ 86.294987][ T5330] ------------------------------------------------------ [ 86.298001][ T5330] syz.0.0/5330 is trying to acquire lock: [ 86.300407][ T5330] ffff8880426c1840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 86.305362][ T5330] [ 86.305362][ T5330] but task is already holding lock: [ 86.308416][ T5330] ffff8880426c1b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.312251][ T5330] [ 86.312251][ T5330] which lock already depends on the new lock. [ 86.312251][ T5330] [ 86.316515][ T5330] [ 86.316515][ T5330] the existing dependency chain (in reverse order) is: [ 86.320247][ T5330] [ 86.320247][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 86.323319][ T5330] lock_acquire+0x120/0x360 [ 86.325502][ T5330] __mutex_lock+0x187/0x1350 [ 86.327762][ T5330] l2cap_info_timeout+0x60/0xa0 [ 86.329969][ T5330] process_scheduled_works+0xae1/0x17b0 [ 86.332559][ T5330] worker_thread+0x8a0/0xda0 [ 86.334672][ T5330] kthread+0x711/0x8a0 [ 86.336495][ T5330] ret_from_fork+0x4bc/0x870 [ 86.338512][ T5330] ret_from_fork_asm+0x1a/0x30 [ 86.340620][ T5330] [ 86.340620][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.344700][ T5330] validate_chain+0xb9b/0x2140 [ 86.346785][ T5330] __lock_acquire+0xab9/0xd20 [ 86.348861][ T5330] lock_acquire+0x120/0x360 [ 86.350814][ T5330] __flush_work+0x6b8/0xbc0 [ 86.352784][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.354982][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.357179][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.359591][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 86.362124][ T5330] hci_dev_close+0x108/0x200 [ 86.364328][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.366535][ T5330] sock_ioctl+0x576/0x790 [ 86.368864][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.371258][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.373607][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.376569][ T5330] [ 86.376569][ T5330] other info that might help us debug this: [ 86.376569][ T5330] [ 86.380975][ T5330] Possible unsafe locking scenario: [ 86.380975][ T5330] [ 86.384290][ T5330] CPU0 CPU1 [ 86.386614][ T5330] ---- ---- [ 86.388909][ T5330] lock(&conn->lock#2); [ 86.390675][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.394631][ T5330] lock(&conn->lock#2); [ 86.397441][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.400349][ T5330] [ 86.400349][ T5330] *** DEADLOCK *** [ 86.400349][ T5330] [ 86.403737][ T5330] 5 locks held by syz.0.0/5330: [ 86.405759][ T5330] #0: ffff888011918dc8 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x200 [ 86.409710][ T5330] #1: ffff8880119180b8 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x66a/0x1330 [ 86.413661][ T5330] #2: ffffffff8f649b28 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x230 [ 86.417877][ T5330] #3: ffff8880426c1b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x70/0x680 [ 86.421649][ T5330] #4: ffffffff8e13d2e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.425388][ T5330] [ 86.425388][ T5330] stack backtrace: [ 86.427873][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.427889][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.427896][ T5330] Call Trace: [ 86.427904][ T5330] [ 86.427910][ T5330] dump_stack_lvl+0x189/0x250 [ 86.427927][ T5330] ? __pfx_dump_stack_lvl+0x10/0x10 [ 86.427941][ T5330] ? __pfx__printk+0x10/0x10 [ 86.427954][ T5330] ? print_lock_name+0xde/0x100 [ 86.427967][ T5330] print_circular_bug+0x2ee/0x310 [ 86.427987][ T5330] check_noncircular+0x134/0x160 [ 86.428008][ T5330] validate_chain+0xb9b/0x2140 [ 86.428025][ T5330] ? do_raw_spin_lock+0x121/0x290 [ 86.428040][ T5330] ? look_up_lock_class+0x74/0x170 [ 86.428051][ T5330] ? register_lock_class+0x51/0x320 [ 86.428067][ T5330] __lock_acquire+0xab9/0xd20 [ 86.428081][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.428092][ T5330] lock_acquire+0x120/0x360 [ 86.428105][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.428115][ T5330] ? _raw_spin_unlock_irq+0x23/0x50 [ 86.428133][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.428141][ T5330] __flush_work+0x6b8/0xbc0 [ 86.428150][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.428162][ T5330] ? __flush_work+0xd2/0xbc0 [ 86.428172][ T5330] ? __pfx___flush_work+0x10/0x10 [ 86.428184][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.428202][ T5330] ? __pfx___cancel_work+0x10/0x10 [ 86.428215][ T5330] ? hci_conn_drop+0x14d/0x280 [ 86.428231][ T5330] __cancel_work_sync+0xbe/0x110 [ 86.428241][ T5330] l2cap_conn_del+0x4f0/0x680 [ 86.428256][ T5330] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.428267][ T5330] hci_conn_hash_flush+0x10d/0x230 [ 86.428284][ T5330] hci_dev_close_sync+0xaef/0x1330 [ 86.428297][ T5330] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.428310][ T5330] ? do_raw_read_unlock+0x3d/0x80 [ 86.428321][ T5330] hci_dev_close+0x108/0x200 [ 86.428334][ T5330] sock_do_ioctl+0xdc/0x300 [ 86.428348][ T5330] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.428361][ T5330] sock_ioctl+0x576/0x790 [ 86.428373][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.428383][ T5330] ? __fget_files+0x3a0/0x420 [ 86.428396][ T5330] ? __fget_files+0x2a/0x420 [ 86.428410][ T5330] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.428430][ T5330] ? __pfx_sock_ioctl+0x10/0x10 [ 86.428440][ T5330] __se_sys_ioctl+0xfc/0x170 [ 86.428455][ T5330] do_syscall_64+0xfa/0xfa0 [ 86.428466][ T5330] ? lockdep_hardirqs_on+0x9c/0x150 [ 86.428477][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.428488][ T5330] ? clear_bhb_loop+0x60/0xb0 [ 86.428503][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.428514][ T5330] RIP: 0033:0x7f3b9ab8efc9 [ 86.428527][ 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.428537][ T5330] RSP: 002b:00007f3b96fd4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.428549][ T5330] RAX: ffffffffffffffda RBX: 00007f3b9ade6090 RCX: 00007f3b9ab8efc9 [ 86.428559][ T5330] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000009 [ 86.428566][ T5330] RBP: 00007f3b9ac11f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.428573][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.428579][ T5330] R13: 00007f3b9ade6128 R14: 00007f3b9ade6090 R15: 00007ffedcfdcb48 [ 86.428591][ T5330] [ 86.571513][ T4668] Bluetooth: hci0: command tx timeout [ 86.700966][ T5327] usb 5-1: new high-speed USB device number 2 using dummy_hcd [ 86.714974][ T10] cfg80211: failed to load regulatory.db [ 86.880972][ T5327] usb 5-1: Using ep0 maxpacket: 8 [ 86.884602][ T5327] usb 5-1: config index 0 descriptor too short (expected 301, got 45) [ 86.888008][ T5327] usb 5-1: config 16 has an invalid descriptor of length 52, skipping remainder of the config [ 86.892576][ T5327] usb 5-1: config 16 interface 0 altsetting 0 endpoint 0x5 has an invalid bInterval 52, changing to 7 [ 86.897131][ T5327] usb 5-1: config 16 interface 0 altsetting 0 endpoint 0x5 has invalid maxpacket 9272, setting to 1024 [ 86.902350][ T5327] usb 5-1: config 16 interface 0 altsetting 0 has 1 endpoint descriptor, different from the interface descriptor's value: 3 [ 86.907751][ T5327] usb 5-1: New USB device found, idVendor=ee8d, idProduct=db1e, bcdDevice=61.23 [ 86.911905][ T5327] usb 5-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 86.923386][ T5327] usbtmc 5-1:16.0: bulk endpoints not found [ 87.121973][ T5329] usb 5-1: usbfs: process 5329 (syz.0.0) did not claim interface 0 before use [ 88.631004][ T4668] Bluetooth: hci0: command tx timeout [ 90.711023][ T4668] Bluetooth: hci0: command tx timeout