syzbot


possible deadlock in __flush_workqueue

Status: upstream: reported on 2024/01/17 10:03
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+da0a9c9721e36db712e8@syzkaller.appspotmail.com
First crash: 95d, last: 5m
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly bluetooth report (Mar 2024) 0 (1) 2024/03/06 22:08
[syzbot] [bluetooth?] possible deadlock in __flush_workqueue 0 (1) 2024/01/17 10:03
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in __flush_workqueue 22 3d15h 37d 0/3 upstream: reported on 2024/03/14 23:14

Sample crash report:
Bluetooth: hci2: Opcode 0x0c03 failed: -110
============================================
WARNING: possible recursive locking detected
6.9.0-rc4-syzkaller-00266-g977b1ef51866 #0 Not tainted
--------------------------------------------
kworker/u9:1/9092 is trying to acquire lock:
ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: touch_wq_lockdep_map kernel/workqueue.c:3901 [inline]
ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: __flush_workqueue+0x1b0/0x1710 kernel/workqueue.c:3943

but task is already holding lock:
ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3229 [inline]
ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: process_scheduled_works+0x8e0/0x17c0 kernel/workqueue.c:3335

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock((wq_completion)hci2);
  lock((wq_completion)hci2);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by kworker/u9:1/9092:
 #0: ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3229 [inline]
 #0: ffff88805cb26948 ((wq_completion)hci2){+.+.}-{0:0}, at: process_scheduled_works+0x8e0/0x17c0 kernel/workqueue.c:3335
 #1: ffffc90009237d00 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3230 [inline]
 #1: ffffc90009237d00 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_scheduled_works+0x91b/0x17c0 kernel/workqueue.c:3335

stack backtrace:
CPU: 0 PID: 9092 Comm: kworker/u9:1 Not tainted 6.9.0-rc4-syzkaller-00266-g977b1ef51866 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: hci2 hci_error_reset
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 check_deadlock kernel/locking/lockdep.c:3062 [inline]
 validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856
 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
 touch_wq_lockdep_map kernel/workqueue.c:3901 [inline]
 __flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3943
 drain_workqueue+0xc9/0x3a0 kernel/workqueue.c:4107
 destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5673
 hci_release_dev+0x169/0x16a0 net/bluetooth/hci_core.c:2808
 bt_host_release+0x83/0x90 net/bluetooth/hci_sysfs.c:94
 device_release+0x9b/0x1c0
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x231/0x480 lib/kobject.c:737
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3335
 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416
 kthread+0x2f2/0x390 kernel/kthread.c:388
 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (148):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/21 09:31 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/21 05:01 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/21 03:31 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/21 00:45 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/21 00:44 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 23:28 upstream 977b1ef51866 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/20 17:18 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 15:02 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 12:14 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 11:11 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 09:13 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/20 08:12 upstream 13a2e429f644 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 04:08 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/20 04:07 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/20 00:31 upstream dbe0a7be2838 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/19 20:20 upstream dbe0a7be2838 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/15 11:37 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/14 19:57 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/14 07:03 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/14 00:17 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/12 22:11 upstream fe46a7dd189e 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in __flush_workqueue
2024/04/12 20:29 upstream 480e035fc4c7 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 13:38 upstream 13a2e429f644 af24b050 .config console log report info [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/04/19 23:03 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/04/15 03:47 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/04/14 18:48 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/04/13 11:33 upstream fe46a7dd189e c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in __flush_workqueue
2024/03/05 11:02 upstream 90d35da658da 9ed46f64 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in __flush_workqueue
2024/04/05 22:21 bpf 443574b03387 18ea8213 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in __flush_workqueue
2024/04/07 09:54 bpf-next 14bb1e8c8d4a ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in __flush_workqueue
2024/04/20 20:03 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/19 15:23 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/19 13:25 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/19 10:56 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/19 08:59 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/18 18:11 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/18 12:03 linux-next 7b4f2bc91c15 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/17 23:13 linux-next 4eab35893071 bd38b692 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/17 22:10 linux-next 4eab35893071 bd38b692 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/17 21:23 linux-next 4eab35893071 bd38b692 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/17 17:02 linux-next 4eab35893071 bd38b692 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/17 07:52 linux-next 4eab35893071 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/16 11:02 linux-next 66e4190e92ce 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/15 19:16 linux-next 6bd343537461 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/15 13:16 linux-next 6bd343537461 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/15 07:50 linux-next 6bd343537461 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/15 01:45 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/14 16:07 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/14 08:47 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/14 05:16 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/14 04:08 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/13 20:14 linux-next 9ed46da14b9b c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/01/17 06:05 linux-next 943b9f0ab2cf 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in __flush_workqueue
2024/04/08 21:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 707081b61156 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in __flush_workqueue
* Struck through repros no longer work on HEAD.