[v6.1] possible deadlock in discov_off (2)

3 views
Skip to first unread message

syzbot

unread,
Sep 30, 2026, 2:51:30 AMSep 30
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1a8763b93150 Linux 6.1.188
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=174146c9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link: https://syzkaller.appspot.com/bug?extid=417bfe5a11a2813c593f
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/be5de8c5e41e/disk-1a8763b9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b803e8d05dd4/vmlinux-1a8763b9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/723f53728c4f/bzImage-1a8763b9.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+417bfe...@syzkaller.appspotmail.com

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

but task is already holding lock:
ffffc900041d7d00 ((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:9499
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
get_signal+0x1259/0x1340 kernel/signal.c:2884
arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213
__syscall_exit_to_user_mode_work kernel/entry/common.c:295 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:306
ret_from_fork+0x15/0x30 arch/x86/entry/entry_64.S:288

-> #0 (&hdev->lock){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678
__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:8/4291:
#0: ffff888073a36938 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
#1: ffffc900041d7d00 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267

stack backtrace:
CPU: 0 PID: 4291 Comm: kworker/u5:8 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: hci0 discov_off
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678
__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>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages