EXT4-fs warning (device loop2): ext4_empty_dir:3098: inode #11: comm syz-executor: directory missing '.' ====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc2-syzkaller-00074-gd3d1556696c1 #0 Not tainted ------------------------------------------------------ syz-executor/13480 is trying to acquire lock: ffff88807ea78078 (&hdev->lock){+.+.}-{3:3}, at: mgmt_remove_adv_monitor_complete+0x9e/0x2e0 net/bluetooth/mgmt.c:5454 but task is already holding lock: ffff88807ea78690 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}, at: hci_cmd_sync_clear+0x4a/0x100 net/bluetooth/hci_sync.c:654 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 hci_cmd_sync_lookup_entry net/bluetooth/hci_sync.c:834 [inline] hci_cmd_sync_queue_once net/bluetooth/hci_sync.c:778 [inline] hci_update_passive_scan+0x206/0x380 net/bluetooth/hci_sync.c:3203 le_conn_complete_evt+0x1ca/0x1d80 net/bluetooth/hci_event.c:5773 hci_le_conn_complete_evt+0x23c/0x370 net/bluetooth/hci_event.c:5784 hci_le_meta_evt+0x2e5/0x5d0 net/bluetooth/hci_event.c:7132 hci_event_func net/bluetooth/hci_event.c:7440 [inline] hci_event_packet+0x669/0x1180 net/bluetooth/hci_event.c:7495 hci_rx_work+0x2c6/0x16c0 net/bluetooth/hci_core.c:4025 process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c4/0x3a0 kernel/kthread.c:389 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (&hdev->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 mgmt_remove_adv_monitor_complete+0x9e/0x2e0 net/bluetooth/mgmt.c:5454 _hci_cmd_sync_cancel_entry.constprop.0+0x6f/0x1d0 net/bluetooth/hci_sync.c:641 hci_cmd_sync_clear+0xac/0x100 net/bluetooth/hci_sync.c:656 hci_unregister_dev+0x1b8/0x620 net/bluetooth/hci_core.c:2694 vhci_release+0x79/0xf0 drivers/bluetooth/hci_vhci.c:664 __fput+0x3f9/0xb60 fs/file_table.c:431 task_work_run+0x151/0x250 kernel/task_work.c:228 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xadd/0x2d70 kernel/exit.c:939 do_group_exit+0xd3/0x2a0 kernel/exit.c:1088 __do_sys_exit_group kernel/exit.c:1099 [inline] __se_sys_exit_group kernel/exit.c:1097 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1097 x64_sys_call+0x14a9/0x16a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&hdev->cmd_sync_work_lock); lock(&hdev->lock); lock(&hdev->cmd_sync_work_lock); lock(&hdev->lock); *** DEADLOCK *** 1 lock held by syz-executor/13480: #0: ffff88807ea78690 (&hdev->cmd_sync_work_lock){+.+.}-{3:3}, at: hci_cmd_sync_clear+0x4a/0x100 net/bluetooth/hci_sync.c:654 stack backtrace: CPU: 0 UID: 0 PID: 13480 Comm: syz-executor Not tainted 6.12.0-rc2-syzkaller-00074-gd3d1556696c1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x41c/0x610 kernel/locking/lockdep.c:2074 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x250b/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 mgmt_remove_adv_monitor_complete+0x9e/0x2e0 net/bluetooth/mgmt.c:5454 _hci_cmd_sync_cancel_entry.constprop.0+0x6f/0x1d0 net/bluetooth/hci_sync.c:641 hci_cmd_sync_clear+0xac/0x100 net/bluetooth/hci_sync.c:656 hci_unregister_dev+0x1b8/0x620 net/bluetooth/hci_core.c:2694 vhci_release+0x79/0xf0 drivers/bluetooth/hci_vhci.c:664 __fput+0x3f9/0xb60 fs/file_table.c:431 task_work_run+0x151/0x250 kernel/task_work.c:228 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0xadd/0x2d70 kernel/exit.c:939 do_group_exit+0xd3/0x2a0 kernel/exit.c:1088 __do_sys_exit_group kernel/exit.c:1099 [inline] __se_sys_exit_group kernel/exit.c:1097 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1097 x64_sys_call+0x14a9/0x16a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f91b477dff9 Code: Unable to access opcode bytes at 0x7f91b477dfcf. RSP: 002b:00007fff71420f68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f91b47f01b8 RCX: 00007f91b477dff9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000027 R08: 00007fff7141ed06 R09: 00007fff71422220 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff71422220 R13: 00007f91b47f0134 R14: 000055555df824a8 R15: 00007fff714243d0 EXT4-fs (loop2): unmounting filesystem 00000000-0000-0000-0000-000000000000.