program: syz_usb_connect$hid(0x0, 0x0, 0x0, 0x0) r0 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r0, 0x400448ca, 0x0) r1 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$sock_bt_hci(r1, 0x400448c9, 0x0) [ 103.580676][ T54] cfg80211: failed to load regulatory.db [ 103.584514][ T5300] Bluetooth: hci0: command tx timeout [ 103.619830][ T9] [ 103.621434][ T9] ====================================================== [ 103.625315][ T9] WARNING: possible circular locking dependency detected [ 103.628580][ T9] syzkaller #0 Not tainted [ 103.630697][ T9] ------------------------------------------------------ [ 103.634075][ T9] kworker/0:0/9 is trying to acquire lock: [ 103.637020][ T9] ffff888041fabaf8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_info_timeout+0x60/0xa0 [ 103.642456][ T9] [ 103.642456][ T9] but task is already holding lock: [ 103.646096][ T9] ffffc9000022fc40 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: process_scheduled_works+0xa25/0x1830 [ 103.651804][ T9] [ 103.651804][ T9] which lock already depends on the new lock. [ 103.651804][ T9] [ 103.657392][ T9] [ 103.657392][ T9] the existing dependency chain (in reverse order) is: [ 103.662291][ T9] [ 103.662291][ T9] -> #1 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 103.667535][ T9] __flush_work+0x700/0xc50 [ 103.669693][ T9] __cancel_work_sync+0xbe/0x110 [ 103.672198][ T9] l2cap_conn_del+0x40f/0x5c0 [ 103.674527][ T9] hci_conn_hash_flush+0x10d/0x260 [ 103.676957][ T9] hci_dev_close_sync+0x821/0x10e0 [ 103.679741][ T9] hci_dev_close+0x108/0x260 [ 103.682407][ T9] sock_do_ioctl+0x101/0x320 [ 103.685035][ T9] sock_ioctl+0x5c6/0x7f0 [ 103.687744][ T9] __se_sys_ioctl+0xfc/0x170 [ 103.690258][ T9] do_syscall_64+0x14d/0xf80 [ 103.692617][ T9] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 103.696146][ T9] [ 103.696146][ T9] -> #0 (&conn->lock#2){+.+.}-{4:4}: [ 103.701260][ T9] __lock_acquire+0x15a5/0x2cf0 [ 103.704293][ T9] lock_acquire+0xf0/0x2e0 [ 103.707017][ T9] __mutex_lock+0x19f/0x1300 [ 103.709650][ T9] l2cap_info_timeout+0x60/0xa0 [ 103.712231][ T9] process_scheduled_works+0xb02/0x1830 [ 103.714947][ T9] worker_thread+0xa50/0xfc0 [ 103.717606][ T9] kthread+0x388/0x470 [ 103.720330][ T9] ret_from_fork+0x51e/0xb90 [ 103.722912][ T9] ret_from_fork_asm+0x1a/0x30 [ 103.725308][ T9] [ 103.725308][ T9] other info that might help us debug this: [ 103.725308][ T9] [ 103.730071][ T9] Possible unsafe locking scenario: [ 103.730071][ T9] [ 103.734146][ T9] CPU0 CPU1 [ 103.737077][ T9] ---- ---- [ 103.739853][ T9] lock((work_completion)(&(&conn->info_timer)->work)); [ 103.743240][ T9] lock(&conn->lock#2); [ 103.746318][ T9] lock((work_completion)(&(&conn->info_timer)->work)); [ 103.751599][ T9] lock(&conn->lock#2); [ 103.754325][ T9] [ 103.754325][ T9] *** DEADLOCK *** [ 103.754325][ T9] [ 103.757908][ T9] 2 locks held by kworker/0:0/9: [ 103.760075][ T9] #0: ffff88801aca6948 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9ea/0x1830 [ 103.764664][ T9] #1: ffffc9000022fc40 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: process_scheduled_works+0xa25/0x1830 [ 103.771791][ T9] [ 103.771791][ T9] stack backtrace: [ 103.774598][ T9] CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted syzkaller #0 PREEMPT(full) [ 103.774617][ T9] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 103.774625][ T9] Workqueue: events l2cap_info_timeout [ 103.774647][ T9] Call Trace: [ 103.774655][ T9] [ 103.774661][ T9] dump_stack_lvl+0xe8/0x150 [ 103.774674][ T9] print_circular_bug+0x2e1/0x300 [ 103.774689][ T9] check_noncircular+0x12e/0x150 [ 103.774704][ T9] __lock_acquire+0x15a5/0x2cf0 [ 103.774717][ T9] ? __schedule+0x15f3/0x52d0 [ 103.774732][ T9] ? ret_from_fork_asm+0x1a/0x30 [ 103.774747][ T9] lock_acquire+0xf0/0x2e0 [ 103.774759][ T9] ? l2cap_info_timeout+0x60/0xa0 [ 103.774771][ T9] __mutex_lock+0x19f/0x1300 [ 103.774794][ T9] ? l2cap_info_timeout+0x60/0xa0 [ 103.774805][ T9] ? irqentry_exit+0x59e/0x620 [ 103.774816][ T9] ? lockdep_hardirqs_on+0x7a/0x110 [ 103.774826][ T9] ? l2cap_info_timeout+0x60/0xa0 [ 103.774835][ T9] ? irqentry_exit+0x59e/0x620 [ 103.774847][ T9] ? trace_irq_disable+0x3b/0x150 [ 103.774863][ T9] ? __pfx___mutex_lock+0x10/0x10 [ 103.774880][ T9] ? lock_acquire+0x20b/0x2e0 [ 103.774892][ T9] l2cap_info_timeout+0x60/0xa0 [ 103.774902][ T9] ? process_scheduled_works+0xa25/0x1830 [ 103.774915][ T9] process_scheduled_works+0xb02/0x1830 [ 103.774931][ T9] ? __pfx_process_scheduled_works+0x10/0x10 [ 103.774945][ T9] ? assign_work+0x3d5/0x5e0 [ 103.774957][ T9] worker_thread+0xa50/0xfc0 [ 103.774976][ T9] kthread+0x388/0x470 [ 103.774986][ T9] ? __pfx_worker_thread+0x10/0x10 [ 103.774995][ T9] ? __pfx_kthread+0x10/0x10 [ 103.775001][ T9] ret_from_fork+0x51e/0xb90 [ 103.775011][ T9] ? __pfx_ret_from_fork+0x10/0x10 [ 103.775019][ T9] ? __switch_to+0xc7d/0x1450 [ 103.775027][ T9] ? __pfx_kthread+0x10/0x10 [ 103.775034][ T9] ret_from_fork_asm+0x1a/0x30 [ 103.775049][ T9] [ 105.648558][ T5300] Bluetooth: hci0: command tx timeout [ 107.728576][ T5300] Bluetooth: hci0: command tx timeout [ 109.813533][ T5300] Bluetooth: hci0: command tx timeout