====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc2-syzkaller-00010-g69b41ac87e4a #0 Not tainted ------------------------------------------------------ kworker/u5:1/4376 is trying to acquire lock: ffff88802804c078 (&hdev->lock){+.+.}-{3:3}, at: discov_off+0x7e/0x1e0 net/bluetooth/mgmt.c:1037 but task is already holding lock: ffffc90006777d00 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264 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}: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __flush_work+0xeb/0x1a0 kernel/workqueue.c:3069 __cancel_work_timer+0x517/0x6a0 kernel/workqueue.c:3160 mgmt_index_removed+0x2ee/0x430 net/bluetooth/mgmt.c:9432 hci_unregister_dev+0x291/0x460 net/bluetooth/hci_core.c:2708 vhci_release+0x7f/0xd0 drivers/bluetooth/hci_vhci.c:568 __fput+0x3ba/0x880 fs/file_table.c:320 task_work_run+0x243/0x300 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x644/0x2150 kernel/exit.c:867 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1012 get_signal+0x1755/0x1820 kernel/signal.c:2859 arch_do_signal_or_restart+0x8d/0x5f0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop+0x74/0x160 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xad/0x110 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x2e/0x60 kernel/entry/common.c:296 ret_from_fork+0x15/0x30 arch/x86/entry/entry_64.S:301 -> #0 (&hdev->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 discov_off+0x7e/0x1e0 net/bluetooth/mgmt.c:1037 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 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:1/4376: #0: ffff888078695138 ((wq_completion)hci0){+.+.}-{0:0}, at: process_one_work+0x796/0xd10 kernel/workqueue.c:2262 #1: ffffc90006777d00 ((work_completion)(&(&hdev->discov_off)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0xd10 kernel/workqueue.c:2264 stack backtrace: CPU: 1 PID: 4376 Comm: kworker/u5:1 Not tainted 6.2.0-rc2-syzkaller-00010-g69b41ac87e4a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: hci0 discov_off Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f9/0x3b0 kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain+0x184a/0x6470 kernel/locking/lockdep.c:3831 __lock_acquire+0x1292/0x1f60 kernel/locking/lockdep.c:5055 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __mutex_lock_common+0x1de/0x26c0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799 discov_off+0x7e/0x1e0 net/bluetooth/mgmt.c:1037 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308