possible deadlock in discov_off (2)

Status: upstream: reported on 2026/09/30 06:51
Reported-by: syzbot+417bfe5a11a2813c593f@syzkaller.appspotmail.com
First crash: 10d, last: 5d01h
▶ ▼ Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in discov_off 4 2 1096d 1117d 0/3 auto-obsoleted due to no activity on 2024/01/18 09:25
upstream possible deadlock in discov_off bluetooth 4 127 1012d 1468d 0/29 auto-obsoleted due to no activity on 2024/03/12 04:33

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u5:5/4285 is trying to acquire lock:
ffff88807b7b4428 (&hdev->lock){+.+.}-{3:3}, at: discov_off+0x86/0x1f0 net/bluetooth/mgmt.c:1034

but task is already holding lock:
ffffc900043b7d00 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}:
       __flush_work+0x122/0xac0 kernel/workqueue.c:3072
       __cancel_work_timer+0x3f4/0x560 kernel/workqueue.c:3163
       mgmt_index_removed+0x269/0x310 net/bluetooth/mgmt.c:9528
       hci_unregister_dev+0x2ee/0x500 net/bluetooth/hci_core.c:2724
       vhci_release+0x7f/0xd0 drivers/bluetooth/hci_vhci.c:565
       __fput+0x20a/0x8b0 fs/file_table.c:320
       task_work_run+0x1d0/0x260 kernel/task_work.c:203
       exit_task_work include/linux/task_work.h:39 [inline]
       do_exit+0x9d5/0x2570 kernel/exit.c:887
       do_group_exit+0x229/0x2e0 kernel/exit.c:1030
       __do_sys_exit_group kernel/exit.c:1041 [inline]
       __se_sys_exit_group kernel/exit.c:1039 [inline]
       __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1039
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&hdev->lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3162 [inline]
       check_prevs_add kernel/locking/lockdep.c:3281 [inline]
       validate_chain kernel/locking/lockdep.c:3897 [inline]
       __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171
       lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
       discov_off+0x86/0x1f0 net/bluetooth/mgmt.c:1034
       process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
       worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
       kthread+0x29d/0x330 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((work_completion)(&(&hdev->discov_off)->work));
                               lock(&hdev->lock);
                               lock((work_completion)(&(&hdev->discov_off)->work));
  lock(&hdev->lock);

 *** DEADLOCK ***

2 locks held by kworker/u5:5/4285:
 #0: ffff888046af1938 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
 #1: ffffc900043b7d00 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267

stack backtrace:
CPU: 1 PID: 4285 Comm: kworker/u5:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: hci0 discov_off
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2215
 check_prev_add kernel/locking/lockdep.c:3162 [inline]
 check_prevs_add kernel/locking/lockdep.c:3281 [inline]
 validate_chain kernel/locking/lockdep.c:3897 [inline]
 __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171
 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
 discov_off+0x86/0x1f0 net/bluetooth/mgmt.c:1034
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/06 00:55 linux-6.1.y a500ba24937a f7710056 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in discov_off
2026/10/02 18:10 linux-6.1.y 1a8763b93150 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in discov_off
2026/10/01 13:23 linux-6.1.y 1a8763b93150 f5cdae2f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in discov_off
2026/09/30 18:55 linux-6.1.y 1a8763b93150 38f7f0d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in discov_off
2026/09/30 06:50 linux-6.1.y 1a8763b93150 7808aef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in discov_off
* Struck through repros no longer work on HEAD.