======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
kworker/u11:0/14727 is trying to acquire lock:
ffffffff903fbea0 (rfcomm_mutex){+.+.}-{4:4}, at: rfcomm_security_cfm+0x90/0x820

but task is already holding lock:
ffffffff903d7bc0 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_auth_complete_evt+0x318/0xc80

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (hci_cb_list_lock){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       hci_remote_features_evt+0x53d/0x950
       hci_event_packet+0x6cd/0xf10
       hci_rx_work+0x3ee/0x1020
       process_scheduled_works+0xc3d/0x1630
       worker_thread+0xa47/0xfb0
       kthread+0x38b/0x480
       ret_from_fork+0x514/0xb70
       ret_from_fork_asm+0x1a/0x30

-> #1 (&hdev->lock){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       l2cap_chan_connect+0x9c/0x1110
       l2cap_sock_connect+0x5e4/0x7e0
       kernel_connect+0x141/0x1c0
       rfcomm_dlc_open+0x644/0x1080
       rfcomm_sock_connect+0x2ed/0x650
       __sys_connect+0x316/0x450
       __x64_sys_connect+0x7a/0x90
       do_syscall_64+0x166/0x520
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (rfcomm_mutex){+.+.}-{4:4}:
       __lock_acquire+0x15ff/0x2e50
       lock_acquire+0x115/0x350
       __mutex_lock+0x19d/0x1550
       rfcomm_security_cfm+0x90/0x820
       hci_auth_complete_evt+0x39f/0xc80
       hci_event_packet+0x6cd/0xf10
       hci_rx_work+0x3ee/0x1020
       process_scheduled_works+0xc3d/0x1630
       worker_thread+0xa47/0xfb0
       kthread+0x38b/0x480
       ret_from_fork+0x514/0xb70
       ret_from_fork_asm+0x1a/0x30

other info that might help us debug this:

Chain exists of:
  rfcomm_mutex --> &hdev->lock --> hci_cb_list_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(hci_cb_list_lock);
                               lock(&hdev->lock);
                               lock(hci_cb_list_lock);
  lock(rfcomm_mutex);

 *** DEADLOCK ***

locks held by kworker/u11:0/14727: 4, last CPU#0:
 #0: ffff888012aa4940 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc90005c27c40 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffff88811f3840b8 (&hdev->lock){+.+.}-{4:4}, at: hci_auth_complete_evt+0x95/0xc80
 #3: ffffffff903d7bc0 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_auth_complete_evt+0x318/0xc80

stack backtrace:
CPU: 0 UID: 0 PID: 14727 Comm: kworker/u11:0 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: hci0 hci_rx_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e2/0x300
 check_noncircular+0x12f/0x150
 __lock_acquire+0x15ff/0x2e50
 lock_acquire+0x115/0x350
 __mutex_lock+0x19d/0x1550
 rfcomm_security_cfm+0x90/0x820
 hci_auth_complete_evt+0x39f/0xc80
 hci_event_packet+0x6cd/0xf10
 hci_rx_work+0x3ee/0x1020
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Bluetooth: hci0: command 0x0406 tx timeout
