syzbot


possible deadlock in __flush_workqueue

Status: upstream: reported on 2024/03/14 23:14
Reported-by: syzbot+3c62604ff542518d26c2@syzkaller.appspotmail.com
First crash: 64d, last: 4h17m
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in __flush_workqueue bluetooth 689 1h16m 122d 0/26 upstream: reported on 2024/01/17 10:03

Sample crash report:
Bluetooth: hci1: Opcode 0x0c03 failed: -110
============================================
WARNING: possible recursive locking detected
6.1.91-syzkaller #0 Not tainted
--------------------------------------------
kworker/u5:2/3567 is trying to acquire lock:
ffff888077873938 ((wq_completion)hci1){+.+.}-{0:0}, at: __flush_workqueue+0x157/0x1610 kernel/workqueue.c:2812

but task is already holding lock:
ffff888077873938 ((wq_completion)hci1){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267

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

       CPU0
       ----
  lock((wq_completion)hci1);
  lock((wq_completion)hci1);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by kworker/u5:2/3567:
 #0: ffff888077873938
 ((wq_completion)hci1){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90004b2fd20 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267

stack backtrace:
CPU: 1 PID: 3567 Comm: kworker/u5:2 Not tainted 6.1.91-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: hci1 hci_error_reset
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __flush_workqueue+0x170/0x1610 kernel/workqueue.c:2812
 drain_workqueue+0xc5/0x390 kernel/workqueue.c:2977
 destroy_workqueue+0x7b/0xae0 kernel/workqueue.c:4423
 hci_release_dev+0x165/0x16b0 net/bluetooth/hci_core.c:2771
 bt_host_release+0x7f/0x90 net/bluetooth/hci_sysfs.c:92
 device_release+0x91/0x1c0
 kobject_cleanup lib/kobject.c:681 [inline]
 kobject_release lib/kobject.c:712 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x224/0x460 lib/kobject.c:729
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Crashes (54):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/18 16:32 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/17 11:26 linux-6.1.y 4078fa637fcd c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __flush_workqueue
2024/05/16 02:54 linux-6.1.y 909ba1f1b414 ef5d53ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/15 15:40 linux-6.1.y 909ba1f1b414 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/15 12:14 linux-6.1.y 909ba1f1b414 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/12 17:48 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/10 19:50 linux-6.1.y 909ba1f1b414 f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/08 22:22 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/08 03:42 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/08 01:22 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/07 22:34 linux-6.1.y 909ba1f1b414 cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/06 13:45 linux-6.1.y 909ba1f1b414 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/06 13:22 linux-6.1.y 909ba1f1b414 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/03 12:11 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/03 11:05 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/03 07:55 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __flush_workqueue
2024/05/02 18:08 linux-6.1.y 909ba1f1b414 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/01 10:02 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/30 00:51 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/29 23:34 linux-6.1.y dcbc050cb0d3 f10afd69 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/29 14:45 linux-6.1.y dcbc050cb0d3 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/25 18:19 linux-6.1.y 6741e066ec76 8bdc0f22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/23 07:49 linux-6.1.y 6741e066ec76 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/22 11:18 linux-6.1.y 6741e066ec76 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/22 07:54 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/22 05:42 linux-6.1.y 6741e066ec76 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/17 18:34 linux-6.1.y 6741e066ec76 acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/17 16:52 linux-6.1.y 6741e066ec76 acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/16 18:50 linux-6.1.y cd5d98c0556c 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/16 05:03 linux-6.1.y cd5d98c0556c 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/15 15:09 linux-6.1.y cd5d98c0556c b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/15 11:52 linux-6.1.y cd5d98c0556c c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/12 03:28 linux-6.1.y bf1e3b1cb1e0 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/09 14:08 linux-6.1.y 347385861c50 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/08 09:45 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/07 02:29 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/04/02 15:12 linux-6.1.y e5cd595e23c1 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/03/26 00:40 linux-6.1.y d7543167affd bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/03/19 14:05 linux-6.1.y d7543167affd e104824c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/03/15 00:03 linux-6.1.y 61adba85cc40 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/03/14 23:13 linux-6.1.y 61adba85cc40 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __flush_workqueue
2024/05/16 00:50 linux-6.1.y 909ba1f1b414 ef5d53ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/05/15 04:00 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/05/05 11:40 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/05/02 20:22 linux-6.1.y 909ba1f1b414 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/22 14:15 linux-6.1.y 6741e066ec76 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/17 12:14 linux-6.1.y 6741e066ec76 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/17 01:14 linux-6.1.y cd5d98c0556c 18f6e127 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/15 13:19 linux-6.1.y cd5d98c0556c b9af7e61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/05 00:23 linux-6.1.y 347385861c50 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/04/03 17:39 linux-6.1.y 347385861c50 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/03/21 00:12 linux-6.1.y d7543167affd 5b7d42ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
2024/03/20 05:16 linux-6.1.y d7543167affd a485f239 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __flush_workqueue
* Struck through repros no longer work on HEAD.