====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ krfcommd/3346 is trying to acquire lock: ffff888020f22138 ((wq_completion)hci4#2){+.+.}-{0:0}, at: __flush_workqueue+0x14c/0x1380 kernel/workqueue.c:2816 but task is already holding lock: ffffffff8eef35c8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_process_sessions net/bluetooth/rfcomm/core.c:2147 [inline] ffffffff8eef35c8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_run+0x4e3/0x5f10 net/bluetooth/rfcomm/core.c:2254 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (rfcomm_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12d/0xb40 kernel/locking/mutex.c:747 rfcomm_security_cfm+0x95/0x780 net/bluetooth/rfcomm/core.c:2272 hci_auth_cfm include/net/bluetooth/hci_core.h:1859 [inline] hci_auth_complete_evt+0x365/0xba0 net/bluetooth/hci_event.c:3562 hci_event_func net/bluetooth/hci_event.c:7379 [inline] hci_event_packet+0x66a/0xe60 net/bluetooth/hci_event.c:7428 hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4084 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #3 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12d/0xb40 kernel/locking/mutex.c:747 hci_connect_cfm include/net/bluetooth/hci_core.h:1820 [inline] hci_remote_features_evt+0x464/0xa10 net/bluetooth/hci_event.c:3802 hci_event_func net/bluetooth/hci_event.c:7379 [inline] hci_event_packet+0x66a/0xe60 net/bluetooth/hci_event.c:7428 hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4084 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #2 (&hdev->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12d/0xb40 kernel/locking/mutex.c:747 hci_cc_reset+0x1b9/0x310 net/bluetooth/hci_event.c:304 hci_cc_func net/bluetooth/hci_event.c:4221 [inline] hci_cmd_complete_evt+0x4e3/0xa40 net/bluetooth/hci_event.c:4238 hci_event_func net/bluetooth/hci_event.c:7376 [inline] hci_event_packet+0x61f/0xe60 net/bluetooth/hci_event.c:7428 hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4084 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #1 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}: process_one_work+0x7ec/0x1160 kernel/workqueue.c:2268 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 -> #0 ((wq_completion)hci4#2){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 __flush_workqueue+0x165/0x1380 kernel/workqueue.c:2816 drain_workqueue+0xca/0x370 kernel/workqueue.c:2981 destroy_workqueue+0x7b/0xb20 kernel/workqueue.c:4427 hci_release_dev+0xdf/0x14c0 net/bluetooth/hci_core.c:2788 bt_host_release+0x8f/0xa0 net/bluetooth/hci_sysfs.c:98 device_release+0x92/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x217/0x450 lib/kobject.c:729 device_release+0x92/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x217/0x450 lib/kobject.c:729 hci_conn_put include/net/bluetooth/hci_core.h:1407 [inline] l2cap_conn_free net/bluetooth/l2cap_core.c:1873 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_conn_put net/bluetooth/l2cap_core.c:1886 [inline] l2cap_chan_destroy net/bluetooth/l2cap_core.c:513 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_chan_put+0x1f4/0x2e0 net/bluetooth/l2cap_core.c:540 l2cap_sock_release+0x179/0x1e0 net/bluetooth/l2cap_sock.c:1498 __sock_release net/socket.c:654 [inline] sock_release+0x7b/0x140 net/socket.c:682 rfcomm_session_del+0x141/0x200 net/bluetooth/rfcomm/core.c:781 rfcomm_process_sessions net/bluetooth/rfcomm/core.c:-1 [inline] rfcomm_run+0x46e1/0x5f10 net/bluetooth/rfcomm/core.c:2254 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 other info that might help us debug this: Chain exists of: (wq_completion)hci4#2 --> hci_cb_list_lock --> rfcomm_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rfcomm_mutex); lock(hci_cb_list_lock); lock(rfcomm_mutex); lock((wq_completion)hci4#2); *** DEADLOCK *** 1 lock held by krfcommd/3346: #0: ffffffff8eef35c8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_process_sessions net/bluetooth/rfcomm/core.c:2147 [inline] #0: ffffffff8eef35c8 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_run+0x4e3/0x5f10 net/bluetooth/rfcomm/core.c:2254 stack backtrace: CPU: 0 PID: 3346 Comm: krfcommd Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 __flush_workqueue+0x165/0x1380 kernel/workqueue.c:2816 drain_workqueue+0xca/0x370 kernel/workqueue.c:2981 destroy_workqueue+0x7b/0xb20 kernel/workqueue.c:4427 hci_release_dev+0xdf/0x14c0 net/bluetooth/hci_core.c:2788 bt_host_release+0x8f/0xa0 net/bluetooth/hci_sysfs.c:98 device_release+0x92/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x217/0x450 lib/kobject.c:729 device_release+0x92/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x217/0x450 lib/kobject.c:729 hci_conn_put include/net/bluetooth/hci_core.h:1407 [inline] l2cap_conn_free net/bluetooth/l2cap_core.c:1873 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_conn_put net/bluetooth/l2cap_core.c:1886 [inline] l2cap_chan_destroy net/bluetooth/l2cap_core.c:513 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_chan_put+0x1f4/0x2e0 net/bluetooth/l2cap_core.c:540 l2cap_sock_release+0x179/0x1e0 net/bluetooth/l2cap_sock.c:1498 __sock_release net/socket.c:654 [inline] sock_release+0x7b/0x140 net/socket.c:682 rfcomm_session_del+0x141/0x200 net/bluetooth/rfcomm/core.c:781 rfcomm_process_sessions net/bluetooth/rfcomm/core.c:-1 [inline] rfcomm_run+0x46e1/0x5f10 net/bluetooth/rfcomm/core.c:2254 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295