[v5.15] possible deadlock in flush_workqueue (2)

0 views
Skip to first unread message

syzbot

unread,
Mar 13, 2024, 3:04:29 PMMar 13
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 574362648507 Linux 5.15.151
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11208ad6180000
kernel config: https://syzkaller.appspot.com/x/.config?x=6c9a42d9e3519ca9
dashboard link: https://syzkaller.appspot.com/bug?extid=b38bf7e30aa2b77660c0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f00d4062000b/disk-57436264.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3a74c2b6ca62/vmlinux-57436264.xz
kernel image: https://storage.googleapis.com/syzbot-assets/93bd706dc219/bzImage-57436264.xz

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

============================================
WARNING: possible recursive locking detected
5.15.151-syzkaller #0 Not tainted
--------------------------------------------
kworker/u5:1/3533 is trying to acquire lock:
ffff88807479d138 ((wq_completion)hci3){+.+.}-{0:0}, at: flush_workqueue+0x154/0x1610 kernel/workqueue.c:2830

but task is already holding lock:
ffff88807479d138 ((wq_completion)hci3){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283

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

CPU0
----
lock((wq_completion)hci3);
lock((wq_completion)hci3);

*** DEADLOCK ***

May be due to missing lock nesting notation

2 locks held by kworker/u5:1/3533:
#0: ffff88807479d138 ((wq_completion)hci3){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
#1: ffffc90002f37d20 ((work_completion)(&hdev->error_reset)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285

stack backtrace:
CPU: 0 PID: 3533 Comm: kworker/u5:1 Not tainted 5.15.151-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Workqueue: hci3 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:2946 [inline]
check_deadlock kernel/locking/lockdep.c:2989 [inline]
validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
flush_workqueue+0x170/0x1610 kernel/workqueue.c:2830
drain_workqueue+0xc5/0x390 kernel/workqueue.c:2995
destroy_workqueue+0x7b/0xae0 kernel/workqueue.c:4439
hci_release_dev+0x165/0x1620 net/bluetooth/hci_core.c:4071
bt_host_release+0x7f/0x90 net/bluetooth/hci_sysfs.c:92
device_release+0x91/0x1c0
kobject_cleanup lib/kobject.c:713 [inline]
kobject_release lib/kobject.c:744 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x224/0x460 lib/kobject.c:761
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</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