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

but task is already holding lock:
ffffffff913dbfc0 (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+0x197/0x15a0
       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+0x197/0x15a0
       hci_release_dev+0x123/0x1520
       bt_host_release+0x93/0xa0
       device_release+0xc4/0x1f0
       kobject_put+0x222/0x550
       device_release+0xc4/0x1f0
       kobject_put+0x222/0x550
       l2cap_chan_put+0x1fd/0x350
       l2cap_sock_release+0x1a2/0x230
       sock_release+0x85/0x150
       rfcomm_session_del+0x14b/0x270
       rfcomm_process_sessions+0x7456/0x9690
       rfcomm_run+0x3f5/0x620
       kthread+0x38b/0x480
       ret_from_fork+0x514/0xb70
       ret_from_fork_asm+0x1a/0x30

-> #0 (rfcomm_mutex){+.+.}-{4:4}:
       __lock_acquire+0x164c/0x2de0
       lock_acquire+0x115/0x350
       __mutex_lock+0x197/0x15a0
       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/55: 4, last CPU#0:
 #0: ffff88803483d940 ((wq_completion)hci3#2){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #1: ffffc9000141fc40 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630
 #2: ffff8881182480b8 (&hdev->lock){+.+.}-{4:4}, at: hci_auth_complete_evt+0x95/0xc80
 #3: ffffffff913dbfc0 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_auth_complete_evt+0x318/0xc80

stack backtrace:
CPU: 0 UID: 0 PID: 55 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: hci3 hci_rx_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e2/0x300
 check_noncircular+0x12f/0x150
 __lock_acquire+0x164c/0x2de0
 lock_acquire+0x115/0x350
 __mutex_lock+0x197/0x15a0
 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 tx timeout
