program: r0 = syz_open_dev$tty1(0xc, 0x4, 0x1) 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) ioctl$sock_bt_hidp_HIDPCONNADD(r2, 0x400448c8, &(0x7f00000000c0)={r1, r1, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r3 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r3, 0x400448ca, 0x0) [ 85.259624][ T5305] Bluetooth: hci0: command tx timeout [ 85.449523][ T5327] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.616779][ T5299] udevd[5299]: setting owner of /dev/input/event4 to uid=0, gid=104 failed: No such file or directory [ 85.636754][ T5328] [ 85.637871][ T5328] ====================================================== [ 85.640908][ T5328] WARNING: possible circular locking dependency detected [ 85.643697][ T5328] syzkaller #0 Not tainted [ 85.645514][ T5328] ------------------------------------------------------ [ 85.648391][ T5328] syz.0.0/5328 is trying to acquire lock: [ 85.650702][ T5328] ffff888036d37840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 85.655496][ T5328] [ 85.655496][ T5328] but task is already holding lock: [ 85.658621][ T5328] ffff888036d37b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.663223][ T5328] [ 85.663223][ T5328] which lock already depends on the new lock. [ 85.663223][ T5328] [ 85.668414][ T5328] [ 85.668414][ T5328] the existing dependency chain (in reverse order) is: [ 85.672154][ T5328] [ 85.672154][ T5328] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.675335][ T5328] __mutex_lock+0x19f/0x1300 [ 85.677626][ T5328] l2cap_info_timeout+0x60/0xa0 [ 85.679900][ T5328] process_scheduled_works+0xaec/0x17a0 [ 85.682693][ T5328] worker_thread+0xda6/0x1360 [ 85.684908][ T5328] kthread+0x726/0x8b0 [ 85.686901][ T5328] ret_from_fork+0x51b/0xa40 [ 85.689152][ T5328] ret_from_fork_asm+0x1a/0x30 [ 85.691313][ T5328] [ 85.691313][ T5328] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.695372][ T5328] __lock_acquire+0x15a5/0x2cf0 [ 85.697482][ T5328] lock_acquire+0x106/0x330 [ 85.699511][ T5328] __flush_work+0x700/0xc50 [ 85.701494][ T5328] __cancel_work_sync+0xbe/0x110 [ 85.703622][ T5328] l2cap_conn_del+0x402/0x5b0 [ 85.705705][ T5328] hci_conn_hash_flush+0x10d/0x260 [ 85.708143][ T5328] hci_dev_close_sync+0x821/0x10e0 [ 85.710565][ T5328] hci_dev_close+0x108/0x260 [ 85.712785][ T5328] sock_do_ioctl+0x101/0x320 [ 85.715093][ T5328] sock_ioctl+0x5c6/0x7f0 [ 85.717238][ T5328] __se_sys_ioctl+0xfc/0x170 [ 85.719475][ T5328] do_syscall_64+0xe2/0xf80 [ 85.721625][ T5328] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.724310][ T5328] [ 85.724310][ T5328] other info that might help us debug this: [ 85.724310][ T5328] [ 85.728678][ T5328] Possible unsafe locking scenario: [ 85.728678][ T5328] [ 85.731942][ T5328] CPU0 CPU1 [ 85.734330][ T5328] ---- ---- [ 85.736659][ T5328] lock(&conn->lock#2); [ 85.738510][ T5328] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.742396][ T5328] lock(&conn->lock#2); [ 85.745190][ T5328] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.748186][ T5328] [ 85.748186][ T5328] *** DEADLOCK *** [ 85.748186][ T5328] [ 85.751501][ T5328] 5 locks held by syz.0.0/5328: [ 85.753551][ T5328] #0: ffff88801bf14ec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x260 [ 85.757592][ T5328] #1: ffff88801bf140c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x10e0 [ 85.762036][ T5328] #2: ffffffff8fb3ac68 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 85.766457][ T5328] #3: ffff888036d37b38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.770400][ T5328] #4: ffffffff8e55a360 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 85.774432][ T5328] [ 85.774432][ T5328] stack backtrace: [ 85.777302][ T5328] CPU: 0 UID: 0 PID: 5328 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.777320][ T5328] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 85.777327][ T5328] Call Trace: [ 85.777336][ T5328] [ 85.777342][ T5328] dump_stack_lvl+0xe8/0x150 [ 85.777362][ T5328] print_circular_bug+0x2e1/0x300 [ 85.777377][ T5328] check_noncircular+0x12e/0x150 [ 85.777390][ T5328] __lock_acquire+0x15a5/0x2cf0 [ 85.777408][ T5328] ? do_raw_spin_lock+0x12b/0x2f0 [ 85.777423][ T5328] ? __flush_work+0x100/0xc50 [ 85.777435][ T5328] lock_acquire+0x106/0x330 [ 85.777449][ T5328] ? __flush_work+0x100/0xc50 [ 85.777460][ T5328] ? __flush_work+0x100/0xc50 [ 85.777469][ T5328] __flush_work+0x700/0xc50 [ 85.777479][ T5328] ? __flush_work+0x100/0xc50 [ 85.777489][ T5328] ? __flush_work+0x100/0xc50 [ 85.777501][ T5328] ? __pfx___flush_work+0x10/0x10 [ 85.777513][ T5328] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.777535][ T5328] ? __cancel_work_sync+0x5c/0x110 [ 85.777548][ T5328] __cancel_work_sync+0xbe/0x110 [ 85.777561][ T5328] l2cap_conn_del+0x402/0x5b0 [ 85.777575][ T5328] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.777587][ T5328] hci_conn_hash_flush+0x10d/0x260 [ 85.777602][ T5328] hci_dev_close_sync+0x821/0x10e0 [ 85.777614][ T5328] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.777625][ T5328] ? lockdep_hardirqs_on+0x7a/0x110 [ 85.777636][ T5328] ? enable_work+0x1fd/0x230 [ 85.777650][ T5328] hci_dev_close+0x108/0x260 [ 85.777678][ T5328] sock_do_ioctl+0x101/0x320 [ 85.777697][ T5328] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.777710][ T5328] ? do_futex+0x333/0x420 [ 85.777730][ T5328] sock_ioctl+0x5c6/0x7f0 [ 85.777745][ T5328] ? __pfx_sock_ioctl+0x10/0x10 [ 85.777760][ T5328] ? __fget_files+0x2a/0x420 [ 85.777771][ T5328] ? __fget_files+0x3a0/0x420 [ 85.777781][ T5328] ? __fget_files+0x2a/0x420 [ 85.777791][ T5328] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.777804][ T5328] ? __pfx_sock_ioctl+0x10/0x10 [ 85.777819][ T5328] __se_sys_ioctl+0xfc/0x170 [ 85.777834][ T5328] do_syscall_64+0xe2/0xf80 [ 85.777846][ T5328] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.777859][ T5328] ? trace_irq_disable+0x37/0x100 [ 85.777871][ T5328] ? clear_bhb_loop+0x60/0xb0 [ 85.777885][ T5328] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.777898][ T5328] RIP: 0033:0x7efd5199aeb9 [ 85.777912][ T5328] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 [ 85.777922][ T5328] RSP: 002b:00007efd5289b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.777938][ T5328] RAX: ffffffffffffffda RBX: 00007efd51c16090 RCX: 00007efd5199aeb9 [ 85.777948][ T5328] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000007 [ 85.777956][ T5328] RBP: 00007efd51a08c1f R08: 0000000000000000 R09: 0000000000000000 [ 85.777962][ T5328] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.777969][ T5328] R13: 00007efd51c16128 R14: 00007efd51c16090 R15: 00007ffd236ee8a8 [ 85.777981][ T5328] [ 87.307545][ T4673] Bluetooth: hci0: command tx timeout [ 89.388400][ T4673] Bluetooth: hci0: command tx timeout [ 91.467490][ T4673] Bluetooth: hci0: command tx timeout [ 91.873499][ T9] cfg80211: failed to load regulatory.db