syzbot


possible deadlock in discov_off

Status: auto-obsoleted due to no activity on 2024/03/12 04:33
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+f047480b1e906b46a3f4@syzkaller.appspotmail.com
First crash: 564d, last: 104d
Discussions (8)
Title Replies (including bot) Last reply
[syzbot] Monthly bluetooth report (Jan 2024) 0 (1) 2024/01/04 11:26
[syzbot] Monthly bluetooth report (Dec 2023) 0 (1) 2023/12/04 12:38
[syzbot] Monthly bluetooth report (Nov 2023) 0 (1) 2023/11/03 10:22
[syzbot] Monthly bluetooth report (Oct 2023) 0 (1) 2023/10/02 12:39
[syzbot] Monthly bluetooth report (Sep 2023) 0 (1) 2023/09/01 08:50
[syzbot] Monthly bluetooth report (Aug 2023) 0 (1) 2023/08/01 12:53
[syzbot] Monthly bluetooth report (Apr 2023) 0 (1) 2023/04/30 08:00
[syzbot] possible deadlock in discov_off 0 (1) 2022/10/03 07:18
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in discov_off 2 188d 208d 0/3 auto-obsoleted due to no activity on 2024/01/18 09:25

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.7.0-rc6-syzkaller #0 Not tainted
------------------------------------------------------
kworker/u5:3/23027 is trying to acquire lock:
ffff8880326f8078 (&hdev->lock){+.+.}-{3:3}, at: discov_off+0x8c/0x1d0 net/bluetooth/mgmt.c:1055

but task is already holding lock:
ffffc9000344fd80 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7eb/0x15d0 kernel/workqueue.c:2603

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+0x103/0xa10 kernel/workqueue.c:3400
       __cancel_work_timer+0x3ef/0x590 kernel/workqueue.c:3491
       mgmt_index_removed+0x1ed/0x350 net/bluetooth/mgmt.c:9436
       hci_unregister_dev+0x472/0x600 net/bluetooth/hci_core.c:2745
       vhci_release+0x7f/0x100 drivers/bluetooth/hci_vhci.c:672
       __fput+0x270/0xb70 fs/file_table.c:394
       task_work_run+0x14d/0x240 kernel/task_work.c:180
       exit_task_work include/linux/task_work.h:38 [inline]
       do_exit+0xa8a/0x2ad0 kernel/exit.c:869
       do_group_exit+0xd4/0x2a0 kernel/exit.c:1018
       get_signal+0x23b5/0x2790 kernel/signal.c:2904
       arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
       exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
       exit_to_user_mode_prepare+0x121/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1e/0x60 kernel/entry/common.c:296
       do_syscall_64+0x4d/0x110 arch/x86/entry/common.c:89
       entry_SYSCALL_64_after_hwframe+0x63/0x6b

-> #0 (&hdev->lock){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2433/0x3b20 kernel/locking/lockdep.c:5137
       lock_acquire kernel/locking/lockdep.c:5754 [inline]
       lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x175/0x9d0 kernel/locking/mutex.c:747
       discov_off+0x8c/0x1d0 net/bluetooth/mgmt.c:1055
       process_one_work+0x886/0x15d0 kernel/workqueue.c:2627
       process_scheduled_works kernel/workqueue.c:2700 [inline]
       worker_thread+0x8b9/0x1290 kernel/workqueue.c:2781
       kthread+0x2c6/0x3a0 kernel/kthread.c:388
       ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

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:3/23027:
 #0: ffff88807ed3f938 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work+0x789/0x15d0 kernel/workqueue.c:2602
 #1: ffffc9000344fd80 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7eb/0x15d0 kernel/workqueue.c:2603

stack backtrace:
CPU: 1 PID: 23027 Comm: kworker/u5:3 Not tainted 6.7.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Workqueue: hci0 discov_off
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x317/0x400 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2433/0x3b20 kernel/locking/lockdep.c:5137
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x175/0x9d0 kernel/locking/mutex.c:747
 discov_off+0x8c/0x1d0 net/bluetooth/mgmt.c:1055
 process_one_work+0x886/0x15d0 kernel/workqueue.c:2627
 process_scheduled_works kernel/workqueue.c:2700 [inline]
 worker_thread+0x8b9/0x1290 kernel/workqueue.c:2781
 kthread+0x2c6/0x3a0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>

Crashes (127):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/18 11:51 upstream ceb6a6f023fd 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in discov_off
2023/11/17 20:21 upstream 6bc40e44f1dd cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in discov_off
2023/10/12 03:33 upstream 8182d7a3f1b8 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in discov_off
2023/10/10 03:59 upstream 94f6f0550c62 c9be5398 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in discov_off
2023/08/16 13:27 upstream 4853c74bd7ab 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in discov_off
2023/01/03 19:10 upstream 69b41ac87e4a 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in discov_off
2022/09/29 07:10 upstream c3e0e1e23c70 e2556bc3 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-root possible deadlock in discov_off
2024/01/02 04:32 net 9bf2e9165f90 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/12/21 22:31 net 7c5e046bdcb2 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/12/20 13:24 net bd7f77dae695 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/12/07 04:34 net fe2b1226656a e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/12/02 10:55 net 6c89f4996437 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/11/27 02:31 net ccf49cebe595 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/11/23 10:17 net 99360d9620f0 03e12510 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/11/12 23:46 net 2bd5b559a1f3 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/11/11 21:34 net 2bd5b559a1f3 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/11/11 01:38 net 719639853d88 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/10 05:16 net 26c29961b142 c9be5398 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/10 03:09 net 776fe19953b0 c9be5398 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/09 04:05 net 776fe19953b0 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/08 14:06 net 66cf7435a269 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/08 12:44 net a2e52554c710 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/10/05 16:24 net fcdfc462881d b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in discov_off
2023/12/19 00:02 net-next 509afc745270 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/12/18 05:17 net-next 610a689d2a57 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/30 18:51 net-next 7e0222686316 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/27 13:21 net-next e1df5202e879 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/27 07:42 net-next dba1b8a7ab68 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/26 17:06 net-next dba1b8a7ab68 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/26 08:59 net-next 9f1f6111fd5d 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/22 10:39 net-next 53475287dad9 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/22 05:51 net-next 53475287dad9 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/22 00:48 net-next 335662889f5a cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/20 10:59 net-next 94c81c626689 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/19 18:44 net-next ac40916a3f72 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/17 02:49 net-next 7c93d177d913 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/14 10:34 net-next 89cdf9d55601 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/13 13:27 net-next 89cdf9d55601 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/11 13:32 net-next 89cdf9d55601 6d6dbf8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/11/10 22:41 net-next 89cdf9d55601 45e9b83e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/20 23:47 net-next 86a0348de985 a42250d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/20 07:29 net-next 7ce6936045ba a42250d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/19 15:07 net-next b91f2e13c972 42e1d524 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/18 22:05 net-next c4eee56e14fe 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/17 18:39 net-next 7713ec844756 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/16 16:27 net-next dccce1d7c040 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/15 09:18 net-next 85605fb694f0 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/14 10:41 net-next 85605fb694f0 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/13 11:54 net-next 0e6bb5b7f4c8 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/13 07:37 net-next 0e6bb5b7f4c8 6388bc36 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/11 20:53 net-next bbb63db3b0ec 83165b57 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/05 13:53 net-next 93e7eca853ca b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/05 11:12 net-next 93e7eca853ca b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/10/05 03:31 net-next 93e7eca853ca b7d7ff54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in discov_off
2023/01/21 10:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci edb2f0dc90f2 559a440a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in discov_off
* Struck through repros no longer work on HEAD.