====================================================== WARNING: possible circular locking dependency detected 5.18.0-rc1-next-20220406 #1 Not tainted ------------------------------------------------------ syz-executor.1/6003 is trying to acquire lock: ffff888041cba130 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}, at: sco_conn_del+0x11c/0x2c0 but task is already holding lock: ffffffff857c93c8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (hci_cb_list_lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14c0 hci_remote_features_evt+0x59d/0x990 hci_event_packet+0x779/0xee0 hci_rx_work+0x24c/0xb90 process_one_work+0xa1c/0x16a0 worker_thread+0x637/0x1250 kthread+0x2f2/0x3b0 ret_from_fork+0x22/0x30 -> #1 (&hdev->lock){+.+.}-{3:3}: __mutex_lock+0x136/0x14c0 sco_sock_connect+0x1e0/0xa60 __sys_connect_file+0x151/0x190 __sys_connect+0x161/0x190 __x64_sys_connect+0x6f/0xb0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_SCO){+.+.}-{0:0}: __lock_acquire+0x2c2f/0x6120 lock_acquire+0x1a2/0x530 lock_sock_nested+0x3d/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x62/0x80 hci_conn_hash_flush+0x119/0x230 hci_dev_close_sync+0x4dc/0xf20 hci_rfkill_set_block+0x16f/0x1b0 rfkill_set_block+0x1fd/0x540 rfkill_fop_write+0x2b3/0x530 vfs_write+0x264/0xac0 ksys_write+0x1e8/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: sk_lock-AF_BLUETOOTH-BTPROTO_SCO --> &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); SELinux: security_context_str_to_sid (user_ufowner<00000000000000000000,) failed with errno=-22 lock(sk_lock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 4 locks held by syz-executor.1/6003: #0: ffffffff85882808 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0x15d/0x530 #1: ffff888041881048 (&hdev->req_lock){+.+.}-{3:3}, at: hci_rfkill_set_block+0x167/0x1b0 #2: ffff888041880078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x241/0xf20 #3: ffffffff857c93c8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 stack backtrace: CPU: 0 PID: 6003 Comm: syz-executor.1 Not tainted 5.18.0-rc1-next-20220406 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 check_noncircular+0x25f/0x2e0 __lock_acquire+0x2c2f/0x6120 lock_acquire+0x1a2/0x530 SELinux: security_context_str_to_sid (user_ufowner<00000000000000000000,) failed with errno=-22 lock_sock_nested+0x3d/0xf0 sco_conn_del+0x11c/0x2c0 sco_disconn_cfm+0x62/0x80 hci_conn_hash_flush+0x119/0x230 hci_dev_close_sync+0x4dc/0xf20 hci_rfkill_set_block+0x16f/0x1b0 rfkill_set_block+0x1fd/0x540 rfkill_fop_write+0x2b3/0x530 vfs_write+0x264/0xac0 ksys_write+0x1e8/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f7ff42d4b19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7ff184a188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f7ff43e7f60 RCX: 00007f7ff42d4b19 RDX: 0000000000000008 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 00007f7ff432ef6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc65373aef R14: 00007f7ff184a300 R15: 0000000000022000 SELinux: security_context_str_to_sid (user_ufowner<00000000000000000000,) failed with errno=-22 devpts: called with bogus options SELinux: security_context_str_to_sid (user_ufowner<00000000000000000000,) failed with errno=-22 devpts: called with bogus options SELinux: security_context_str_to_sid (user_ufowner<00000000000000000000,) failed with errno=-22