Warning: Permanently added '10.128.0.151' (ED25519) to the list of known hosts. executing program [ 56.697552][ T3564] [ 56.699916][ T3564] ====================================================== [ 56.706924][ T3564] WARNING: possible circular locking dependency detected [ 56.713943][ T3564] 5.15.164-syzkaller #0 Not tainted [ 56.719127][ T3564] ------------------------------------------------------ [ 56.726167][ T3564] syz-executor425/3564 is trying to acquire lock: [ 56.732585][ T3564] ffff88807963cb98 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}, at: __flush_work+0xcf/0x1a0 [ 56.743078][ T3564] [ 56.743078][ T3564] but task is already holding lock: [ 56.750430][ T3564] ffff88807963cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 56.759748][ T3564] [ 56.759748][ T3564] which lock already depends on the new lock. [ 56.759748][ T3564] [ 56.770256][ T3564] [ 56.770256][ T3564] the existing dependency chain (in reverse order) is: [ 56.779266][ T3564] [ 56.779266][ T3564] -> #3 (&hdev->req_lock){+.+.}-{3:3}: [ 56.786913][ T3564] lock_acquire+0x1db/0x4f0 [ 56.791938][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 56.797669][ T3564] mutex_lock_nested+0x17/0x20 [ 56.802974][ T3564] hci_dev_do_close+0x63/0x1070 [ 56.808350][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 56.814073][ T3564] rfkill_set_block+0x1e7/0x430 [ 56.819448][ T3564] rfkill_fop_write+0x5b7/0x790 [ 56.824825][ T3564] vfs_write+0x30c/0xe50 [ 56.829597][ T3564] ksys_write+0x1a2/0x2c0 [ 56.834803][ T3564] do_syscall_64+0x3b/0xb0 [ 56.839834][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 56.846266][ T3564] [ 56.846266][ T3564] -> #2 (rfkill_global_mutex){+.+.}-{3:3}: [ 56.854373][ T3564] lock_acquire+0x1db/0x4f0 [ 56.859407][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 56.859431][ T3564] mutex_lock_nested+0x17/0x20 [ 56.870407][ T3564] rfkill_register+0x30/0x880 [ 56.875614][ T3564] hci_register_dev+0x4dd/0xa50 [ 56.880993][ T3564] vhci_create_device+0x310/0x590 [ 56.886550][ T3564] vhci_write+0x382/0x430 [ 56.891402][ T3564] vfs_write+0xacd/0xe50 [ 56.896180][ T3564] ksys_write+0x1a2/0x2c0 [ 56.901031][ T3564] do_syscall_64+0x3b/0xb0 [ 56.905967][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 56.912383][ T3564] [ 56.912383][ T3564] -> #1 (&data->open_mutex){+.+.}-{3:3}: [ 56.920201][ T3564] lock_acquire+0x1db/0x4f0 [ 56.925229][ T3564] __mutex_lock_common+0x1da/0x25a0 [ 56.930957][ T3564] mutex_lock_nested+0x17/0x20 [ 56.936270][ T3564] vhci_send_frame+0x8a/0xf0 [ 56.941391][ T3564] hci_send_frame+0x1af/0x2f0 [ 56.946593][ T3564] hci_tx_work+0xb0b/0x19d0 [ 56.951624][ T3564] process_one_work+0x8a1/0x10c0 [ 56.957091][ T3564] worker_thread+0xaca/0x1280 [ 56.962299][ T3564] kthread+0x3f6/0x4f0 [ 56.966897][ T3564] ret_from_fork+0x1f/0x30 [ 56.971845][ T3564] [ 56.971845][ T3564] -> #0 ((work_completion)(&hdev->tx_work)){+.+.}-{0:0}: [ 56.981061][ T3564] validate_chain+0x1649/0x5930 [ 56.986440][ T3564] __lock_acquire+0x1295/0x1ff0 [ 56.991830][ T3564] lock_acquire+0x1db/0x4f0 [ 56.996859][ T3564] __flush_work+0xeb/0x1a0 [ 57.001804][ T3564] hci_dev_do_close+0x20a/0x1070 [ 57.007274][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 57.012998][ T3564] rfkill_set_block+0x1e7/0x430 [ 57.018398][ T3564] rfkill_fop_write+0x5b7/0x790 [ 57.023778][ T3564] vfs_write+0x30c/0xe50 [ 57.028547][ T3564] ksys_write+0x1a2/0x2c0 [ 57.033404][ T3564] do_syscall_64+0x3b/0xb0 [ 57.038347][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 57.044766][ T3564] [ 57.044766][ T3564] other info that might help us debug this: [ 57.044766][ T3564] [ 57.054989][ T3564] Chain exists of: [ 57.054989][ T3564] (work_completion)(&hdev->tx_work) --> rfkill_global_mutex --> &hdev->req_lock [ 57.054989][ T3564] [ 57.069943][ T3564] Possible unsafe locking scenario: [ 57.069943][ T3564] [ 57.077391][ T3564] CPU0 CPU1 [ 57.082756][ T3564] ---- ---- [ 57.088117][ T3564] lock(&hdev->req_lock); [ 57.092538][ T3564] lock(rfkill_global_mutex); [ 57.099830][ T3564] lock(&hdev->req_lock); [ 57.106770][ T3564] lock((work_completion)(&hdev->tx_work)); [ 57.112754][ T3564] [ 57.112754][ T3564] *** DEADLOCK *** [ 57.112754][ T3564] [ 57.120890][ T3564] 2 locks held by syz-executor425/3564: [ 57.126427][ T3564] #0: ffffffff8dcbcc48 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0x1a5/0x790 [ 57.136519][ T3564] #1: ffff88807963cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 [ 57.146280][ T3564] [ 57.146280][ T3564] stack backtrace: [ 57.152170][ T3564] CPU: 1 PID: 3564 Comm: syz-executor425 Not tainted 5.15.164-syzkaller #0 [ 57.160758][ T3564] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 [ 57.170821][ T3564] Call Trace: [ 57.174101][ T3564] [ 57.177032][ T3564] dump_stack_lvl+0x1e3/0x2d0 [ 57.181720][ T3564] ? io_uring_drop_tctx_refs+0x1a0/0x1a0 [ 57.187372][ T3564] ? print_circular_bug+0x12b/0x1a0 [ 57.192573][ T3564] check_noncircular+0x2f8/0x3b0 [ 57.197539][ T3564] ? add_chain_block+0x850/0x850 [ 57.202489][ T3564] ? lockdep_lock+0x11f/0x2a0 [ 57.207176][ T3564] ? stack_trace_save+0x113/0x1c0 [ 57.212209][ T3564] validate_chain+0x1649/0x5930 [ 57.217081][ T3564] ? reacquire_held_locks+0x660/0x660 [ 57.222455][ T3564] ? validate_chain+0x13bd/0x5930 [ 57.227494][ T3564] ? look_up_lock_class+0x77/0x120 [ 57.232611][ T3564] ? register_lock_class+0x100/0x9a0 [ 57.237901][ T3564] ? is_dynamic_key+0x1f0/0x1f0 [ 57.242755][ T3564] ? mark_lock+0x98/0x340 [ 57.247090][ T3564] __lock_acquire+0x1295/0x1ff0 [ 57.251950][ T3564] lock_acquire+0x1db/0x4f0 [ 57.256546][ T3564] ? __flush_work+0xcf/0x1a0 [ 57.261149][ T3564] ? read_lock_is_recursive+0x10/0x10 [ 57.266530][ T3564] ? mark_lock+0x98/0x340 [ 57.270882][ T3564] __flush_work+0xeb/0x1a0 [ 57.275322][ T3564] ? __flush_work+0xcf/0x1a0 [ 57.279915][ T3564] ? flush_work+0x20/0x20 [ 57.284263][ T3564] ? _raw_read_unlock_irqrestore+0xd9/0x130 [ 57.290168][ T3564] ? _raw_read_unlock+0x40/0x40 [ 57.295035][ T3564] ? led_trigger_event+0xa6/0xc0 [ 57.299996][ T3564] hci_dev_do_close+0x20a/0x1070 [ 57.304948][ T3564] ? _raw_spin_unlock_irqrestore+0xd9/0x130 [ 57.310856][ T3564] ? kmem_cache_alloc_trace+0x143/0x290 [ 57.316415][ T3564] hci_rfkill_set_block+0x114/0x1a0 [ 57.321625][ T3564] ? rcu_lock_release+0x20/0x20 [ 57.326486][ T3564] rfkill_set_block+0x1e7/0x430 [ 57.331356][ T3564] rfkill_fop_write+0x5b7/0x790 [ 57.336221][ T3564] ? mark_lock+0x98/0x340 [ 57.340559][ T3564] ? rfkill_fop_read+0x470/0x470 [ 57.345515][ T3564] ? fsnotify_perm+0x64/0x590 [ 57.350233][ T3564] ? security_file_permission+0x75/0xa0 [ 57.355794][ T3564] ? rfkill_fop_read+0x470/0x470 [ 57.360743][ T3564] vfs_write+0x30c/0xe50 [ 57.365089][ T3564] ? file_end_write+0x250/0x250 [ 57.369957][ T3564] ? read_lock_is_recursive+0x10/0x10 [ 57.375345][ T3564] ? __context_tracking_exit+0x4c/0x80 [ 57.380821][ T3564] ? __lock_acquire+0x1ff0/0x1ff0 [ 57.385861][ T3564] ? __fdget_pos+0x1e9/0x380 [ 57.390469][ T3564] ksys_write+0x1a2/0x2c0 [ 57.394812][ T3564] ? print_irqtrace_events+0x210/0x210 [ 57.400279][ T3564] ? __ia32_sys_read+0x80/0x80 [ 57.405053][ T3564] ? syscall_enter_from_user_mode+0x2e/0x240 [ 57.411049][ T3564] ? lockdep_hardirqs_on+0x94/0x130 [ 57.416263][ T3564] ? syscall_enter_from_user_mode+0x2e/0x240 [ 57.422265][ T3564] do_syscall_64+0x3b/0xb0 [ 57.426780][ T3564] ? clear_bhb_loop+0x15/0x70 [ 57.431478][ T3564] entry_SYSCALL_64_after_hwframe+0x66/0xd0 [ 57.437402][ T3564] RIP: 0033:0x7fc59f860719 [ 57.441842][ T3564] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 b0 ff ff ff f7 d8 64 89 01 48 [ 57.461458][ T3564] RSP: 002b:00007ffc220e09b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 57.469904][ T3564] RAX: ffffffffffffffda RBX: 00007fc59f8b811b RCX: 00007fc59f860719 [ 57.477977][ T3564] RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 [ 57.485960][ T3564] RBP: 00007fc59f8b80f9 R08: 000000ff00ffd650 R09: 000000ff00ffd650 [ 57.493947][ T3564] R10: 000000ff00ffd650 R11: 0000000000000246 R12: 00007fc59f8