program: r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) r1 = openat$sysfs(0xffffffffffffff9c, &(0x7f0000000080)='/sys/power/resume', 0x149a82, 0x0) write$cgroup_int(r1, &(0x7f0000000040)=0x1c9, 0x12) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) openat$snapshot(0xffffffffffffff9c, &(0x7f0000000580), 0xa0000, 0x0) [ 85.241408][ T45] Bluetooth: hci0: command tx timeout [ 85.371752][ T5323] block device autoloading is deprecated and will be removed. [ 85.426004][ T5323] [ 85.427261][ T5323] ====================================================== [ 85.430656][ T5323] WARNING: possible circular locking dependency detected [ 85.434400][ T5323] syzkaller #0 Not tainted [ 85.436931][ T5323] ------------------------------------------------------ [ 85.440196][ T5323] syz.0.0/5323 is trying to acquire lock: [ 85.442868][ T5323] ffff88803ac21840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 85.448221][ T5323] [ 85.448221][ T5323] but task is already holding lock: [ 85.452076][ T5323] ffff88803ac21af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.457845][ T5323] [ 85.457845][ T5323] which lock already depends on the new lock. [ 85.457845][ T5323] [ 85.462732][ T5323] [ 85.462732][ T5323] the existing dependency chain (in reverse order) is: [ 85.466965][ T5323] [ 85.466965][ T5323] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.470068][ T5323] __mutex_lock+0x19f/0x1300 [ 85.472268][ T5323] l2cap_info_timeout+0x60/0xa0 [ 85.474572][ T5323] process_scheduled_works+0xb02/0x1830 [ 85.477438][ T5323] worker_thread+0xa50/0xfc0 [ 85.480388][ T5323] kthread+0x388/0x470 [ 85.483057][ T5323] ret_from_fork+0x51e/0xb90 [ 85.485889][ T5323] ret_from_fork_asm+0x1a/0x30 [ 85.488137][ T5323] [ 85.488137][ T5323] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.492488][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 85.494856][ T5323] lock_acquire+0xf0/0x2e0 [ 85.497356][ T5323] __flush_work+0x700/0xc50 [ 85.499752][ T5323] __cancel_work_sync+0xbe/0x110 [ 85.502461][ T5323] l2cap_conn_del+0x40f/0x5c0 [ 85.505153][ T5323] hci_conn_hash_flush+0x10d/0x260 [ 85.508018][ T5323] hci_dev_close_sync+0x821/0x10e0 [ 85.510503][ T5323] hci_dev_close+0x108/0x260 [ 85.512835][ T5323] sock_do_ioctl+0x101/0x320 [ 85.515182][ T5323] sock_ioctl+0x5c6/0x7f0 [ 85.517610][ T5323] __se_sys_ioctl+0xfc/0x170 [ 85.520331][ T5323] do_syscall_64+0x14d/0xf80 [ 85.522749][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.525208][ T5323] [ 85.525208][ T5323] other info that might help us debug this: [ 85.525208][ T5323] [ 85.529355][ T5323] Possible unsafe locking scenario: [ 85.529355][ T5323] [ 85.532514][ T5323] CPU0 CPU1 [ 85.535025][ T5323] ---- ---- [ 85.537122][ T5323] lock(&conn->lock#2); [ 85.539634][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.544523][ T5323] lock(&conn->lock#2); [ 85.547467][ T5323] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.550301][ T5323] [ 85.550301][ T5323] *** DEADLOCK *** [ 85.550301][ T5323] [ 85.553910][ T5323] 5 locks held by syz.0.0/5323: [ 85.555984][ T5323] #0: ffff888041f38ec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x260 [ 85.560372][ T5323] #1: ffff888041f380c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x10e0 [ 85.564425][ T5323] #2: ffffffff8fd5bbe8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 85.569956][ T5323] #3: ffff88803ac21af8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.576298][ T5323] #4: ffffffff8e7602e0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 85.580563][ T5323] [ 85.580563][ T5323] stack backtrace: [ 85.582969][ T5323] CPU: 0 UID: 0 PID: 5323 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.582985][ T5323] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 85.582992][ T5323] Call Trace: [ 85.583019][ T5323] [ 85.583026][ T5323] dump_stack_lvl+0xe8/0x150 [ 85.583045][ T5323] print_circular_bug+0x2e1/0x300 [ 85.583062][ T5323] check_noncircular+0x12e/0x150 [ 85.583079][ T5323] __lock_acquire+0x15a5/0x2cf0 [ 85.583094][ T5323] ? do_raw_spin_lock+0x12b/0x2f0 [ 85.583108][ T5323] ? do_raw_spin_unlock+0x4d/0x210 [ 85.583119][ T5323] lock_acquire+0xf0/0x2e0 [ 85.583128][ T5323] ? __flush_work+0x100/0xc50 [ 85.583140][ T5323] ? __flush_work+0x100/0xc50 [ 85.583150][ T5323] __flush_work+0x700/0xc50 [ 85.583160][ T5323] ? __flush_work+0x100/0xc50 [ 85.583172][ T5323] ? __flush_work+0x100/0xc50 [ 85.583186][ T5323] ? __pfx___flush_work+0x10/0x10 [ 85.583201][ T5323] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.583219][ T5323] ? __cancel_work_sync+0x5c/0x110 [ 85.583229][ T5323] __cancel_work_sync+0xbe/0x110 [ 85.583240][ T5323] l2cap_conn_del+0x40f/0x5c0 [ 85.583251][ T5323] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 85.583260][ T5323] hci_conn_hash_flush+0x10d/0x260 [ 85.583272][ T5323] hci_dev_close_sync+0x821/0x10e0 [ 85.583282][ T5323] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 85.583290][ T5323] ? lockdep_hardirqs_on+0x7a/0x110 [ 85.583302][ T5323] ? enable_work+0x1fd/0x230 [ 85.583313][ T5323] hci_dev_close+0x108/0x260 [ 85.583323][ T5323] sock_do_ioctl+0x101/0x320 [ 85.583331][ T5323] ? __pfx_sock_do_ioctl+0x10/0x10 [ 85.583337][ T5323] ? do_futex+0x395/0x420 [ 85.583347][ T5323] sock_ioctl+0x5c6/0x7f0 [ 85.583358][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 85.583368][ T5323] ? __fget_files+0x2a/0x420 [ 85.583378][ T5323] ? __fget_files+0x3a0/0x420 [ 85.583386][ T5323] ? __fget_files+0x2a/0x420 [ 85.583397][ T5323] ? bpf_lsm_file_ioctl+0x9/0x20 [ 85.583406][ T5323] ? __pfx_sock_ioctl+0x10/0x10 [ 85.583419][ T5323] __se_sys_ioctl+0xfc/0x170 [ 85.583427][ T5323] do_syscall_64+0x14d/0xf80 [ 85.583439][ T5323] ? trace_irq_disable+0x3b/0x150 [ 85.583450][ T5323] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.583457][ T5323] ? clear_bhb_loop+0x40/0x90 [ 85.583464][ T5323] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.583472][ T5323] RIP: 0033:0x7f8fe939c799 [ 85.583482][ T5323] 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.583488][ T5323] RSP: 002b:00007f8fea213fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 85.583498][ T5323] RAX: ffffffffffffffda RBX: 00007f8fe9615fa0 RCX: 00007f8fe939c799 [ 85.583503][ T5323] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 [ 85.583508][ T5323] RBP: 00007f8fe9432bd9 R08: 0000000000000000 R09: 0000000000000000 [ 85.583512][ T5323] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.583516][ T5323] R13: 00007f8fe9616038 R14: 00007f8fe9615fa0 R15: 00007ffcd106b618 [ 85.583523][ T5323] [ 87.258126][ T45] Bluetooth: hci0: command tx timeout [ 89.338461][ T45] Bluetooth: hci0: command tx timeout [ 91.417542][ T45] Bluetooth: hci0: command tx timeout [ 91.821873][ T10] cfg80211: failed to load regulatory.db