Warning: Permanently added '10.128.1.40' (ED25519) to the list of known hosts. [*] Starting reproducer for circular locking dependency in uvcg_extension_bm_controls_store [+] /sys/kernel/config exists. [+] configfs is already mounted at /sys/kernel/config. [*] [Initial] lockdep debug_locks status: 1 [*] Attempting to establish Edge #3 via an independent configfs subsystem... [-] /sys/kernel/config/nullb not available or failed: File exists. Trying netconsole... [-] /sys/kernel/config/netconsole not available or failed: No such file or directory. Scanning /sys/kernel/config... [*] Trying mkdir /sys/kernel/config/thunderbolt/repro_leaf [*] Trying mkdir /sys/kernel/config/dlm/repro_leaf [+] mkdir /sys/kernel/config/dlm/repro_leaf successful. [+] rmdir /sys/kernel/config/dlm/repro_leaf successful (Edge #3 established via dlm). [*] [After Edge #3] lockdep debug_locks status: 1 [+] mkdir /sys/kernel/config/usb_gadget/g1 successful. [+] mkdir /sys/kernel/config/usb_gadget/g1/functions/tcm.usb0 successful (Edge #1 established). [*] [After Edge #1] lockdep debug_locks status: 1 [+] mkdir /sys/kernel/config/target/usb_gadget successful. [+] mkdir /sys/kernel/config/target/usb_gadget/naa.1234567890123456 successful. [+] mkdir /sys/kernel/config/target/usb_gadget/naa.1234567890123456/tpgt_1 successful (Edge #2 established). [*] [After Edge #2] lockdep debug_locks status: 1 [+] mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0 successful. [+] mkdir /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/extensions/ext.0 successful. [+] open /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/extensions/ext.0/bmControls successful. [ 116.481743][ T6033] [ 116.484103][ T6033] ====================================================== [ 116.491115][ T6033] WARNING: possible circular locking dependency detected [ 116.498129][ T6033] syzkaller #0 Not tainted [ 116.502537][ T6033] ------------------------------------------------------ [ 116.509548][ T6033] syz-executor993/6033 is trying to acquire lock: [ 116.515960][ T6033] ffffffff91034e48 (gadget_subsys.su_mutex){+.+.}-{4:4}, at: uvcg_extension_bm_controls_store+0xe4/0xb00 [ 116.527216][ T6033] [ 116.527216][ T6033] but task is already holding lock: [ 116.534576][ T6033] ffff88802b036a70 (&p->frag_sem){++++}-{4:4}, at: configfs_write_iter+0x238/0x430 [ 116.543916][ T6033] [ 116.543916][ T6033] which lock already depends on the new lock. [ 116.543916][ T6033] [ 116.554314][ T6033] [ 116.554314][ T6033] the existing dependency chain (in reverse order) is: [ 116.563329][ T6033] [ 116.563329][ T6033] -> #4 (&p->frag_sem){++++}-{4:4}: [ 116.570745][ T6033] down_write_killable+0xa1/0x230 [ 116.576311][ T6033] configfs_rmdir+0x3b0/0x950 [ 116.581526][ T6033] vfs_rmdir+0x3e6/0x6f0 [ 116.586382][ T6033] filename_rmdir+0x276/0x500 [ 116.591593][ T6033] __se_sys_rmdir+0x2e/0x140 [ 116.596747][ T6033] do_syscall_64+0x171/0x540 [ 116.601864][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 116.608297][ T6033] [ 116.608297][ T6033] -> #3 (&sb->s_type->i_mutex_key#24){++++}-{4:4}: [ 116.617018][ T6033] down_write+0x91/0x200 [ 116.621794][ T6033] configfs_depend_item_unlocked+0x153/0x420 [ 116.628310][ T6033] usbg_make_tpg+0x1e0/0x550 [ 116.633442][ T6033] target_fabric_make_tpg+0xa8/0x6d0 [ 116.639270][ T6033] configfs_mkdir+0x4f6/0x9e0 [ 116.644489][ T6033] vfs_mkdir+0x411/0x660 [ 116.649277][ T6033] filename_mkdirat+0x284/0x550 [ 116.654667][ T6033] __se_sys_mkdir+0x34/0x150 [ 116.659786][ T6033] do_syscall_64+0x171/0x540 [ 116.664906][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 116.671334][ T6033] [ 116.671334][ T6033] -> #2 (tpg_instances_lock){+.+.}-{4:4}: [ 116.679274][ T6033] __mutex_lock+0x197/0x15a0 [ 116.684394][ T6033] tcm_alloc_inst+0x65/0x1a0 [ 116.689531][ T6033] usb_get_function_instance+0xe3/0x2f0 [ 116.695620][ T6033] function_make+0x127/0x360 [ 116.700761][ T6033] configfs_mkdir+0x4f6/0x9e0 [ 116.705973][ T6033] vfs_mkdir+0x411/0x660 [ 116.710761][ T6033] filename_mkdirat+0x284/0x550 [ 116.716156][ T6033] __se_sys_mkdir+0x34/0x150 [ 116.721270][ T6033] do_syscall_64+0x171/0x540 [ 116.726385][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 116.732798][ T6033] [ 116.732798][ T6033] -> #1 (func_lock){+.+.}-{4:4}: [ 116.739948][ T6033] __mutex_lock+0x197/0x15a0 [ 116.745057][ T6033] usb_get_function_instance+0x2e/0x2f0 [ 116.751136][ T6033] function_make+0x127/0x360 [ 116.756259][ T6033] configfs_mkdir+0x4f6/0x9e0 [ 116.761462][ T6033] vfs_mkdir+0x411/0x660 [ 116.766239][ T6033] filename_mkdirat+0x284/0x550 [ 116.771625][ T6033] __se_sys_mkdir+0x34/0x150 [ 116.776734][ T6033] do_syscall_64+0x171/0x540 [ 116.781844][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 116.788264][ T6033] [ 116.788264][ T6033] -> #0 (gadget_subsys.su_mutex){+.+.}-{4:4}: [ 116.796536][ T6033] __lock_acquire+0x164c/0x2de0 [ 116.802009][ T6033] lock_acquire+0x115/0x350 [ 116.807045][ T6033] __mutex_lock+0x197/0x15a0 [ 116.812158][ T6033] uvcg_extension_bm_controls_store+0xe4/0xb00 [ 116.818842][ T6033] configfs_write_iter+0x337/0x430 [ 116.824476][ T6033] vfs_write+0x612/0xba0 [ 116.829248][ T6033] ksys_write+0x150/0x270 [ 116.834107][ T6033] do_syscall_64+0x171/0x540 [ 116.839219][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 116.845635][ T6033] [ 116.845635][ T6033] other info that might help us debug this: [ 116.845635][ T6033] [ 116.855852][ T6033] Chain exists of: [ 116.855852][ T6033] gadget_subsys.su_mutex --> &sb->s_type->i_mutex_key#24 --> &p->frag_sem [ 116.855852][ T6033] [ 116.870306][ T6033] Possible unsafe locking scenario: [ 116.870306][ T6033] [ 116.877749][ T6033] CPU0 CPU1 [ 116.883151][ T6033] ---- ---- [ 116.888508][ T6033] rlock(&p->frag_sem); [ 116.892752][ T6033] lock(&sb->s_type->i_mutex_key#24); [ 116.900741][ T6033] lock(&p->frag_sem); [ 116.907417][ T6033] lock(gadget_subsys.su_mutex); [ 116.912444][ T6033] [ 116.912444][ T6033] *** DEADLOCK *** [ 116.912444][ T6033] [ 116.920580][ T6033] locks held by syz-executor993/6033: 3, on CPU#1: [ 116.927076][ T6033] #0: ffff88801ebe2478 (sb_writers#12){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 [ 116.936083][ T6033] #1: ffff888070e5b480 (&buffer->mutex){+.+.}-{4:4}, at: configfs_write_iter+0x7e/0x430 [ 116.946029][ T6033] #2: ffff88802b036a70 (&p->frag_sem){++++}-{4:4}, at: configfs_write_iter+0x238/0x430 [ 116.955808][ T6033] [ 116.955808][ T6033] stack backtrace: [ 116.961690][ T6033] CPU: 1 UID: 0 PID: 6033 Comm: syz-executor993 Not tainted syzkaller #0 PREEMPT(full) [ 116.971404][ T6033] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 [ 116.981459][ T6033] Call Trace: [ 116.984734][ T6033] [ 116.987662][ T6033] dump_stack_lvl+0xe8/0x150 [ 116.992271][ T6033] print_circular_bug+0x2e2/0x300 [ 116.997314][ T6033] check_noncircular+0x12f/0x150 [ 117.002280][ T6033] __lock_acquire+0x164c/0x2de0 [ 117.007150][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.012798][ T6033] ? is_bpf_text_address+0x26/0x2b0 [ 117.018020][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.023666][ T6033] ? kernel_text_address+0xa5/0xe0 [ 117.028798][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.034447][ T6033] ? __kernel_text_address+0xd/0x30 [ 117.039666][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.045308][ T6033] ? unwind_get_return_address+0x4d/0x90 [ 117.050967][ T6033] ? __pfx_stack_trace_consume_entry+0x10/0x10 [ 117.057144][ T6033] lock_acquire+0x115/0x350 [ 117.061663][ T6033] ? uvcg_extension_bm_controls_store+0xe4/0xb00 [ 117.068009][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.073656][ T6033] __mutex_lock+0x197/0x15a0 [ 117.078251][ T6033] ? uvcg_extension_bm_controls_store+0xe4/0xb00 [ 117.084591][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.090240][ T6033] ? check_noncircular+0xdb/0x150 [ 117.095326][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.101003][ T6033] ? add_lock_to_list+0xc7/0x100 [ 117.105954][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.111593][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.117325][ T6033] ? uvcg_extension_bm_controls_store+0xe4/0xb00 [ 117.123678][ T6033] ? __pfx___mutex_lock+0x10/0x10 [ 117.128722][ T6033] uvcg_extension_bm_controls_store+0xe4/0xb00 [ 117.134898][ T6033] ? lock_acquire+0x115/0x350 [ 117.139590][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.145240][ T6033] ? __pfx_uvcg_extension_bm_controls_store+0x10/0x10 [ 117.152027][ T6033] ? down_read+0x2b9/0x320 [ 117.156458][ T6033] ? __pfx_uvcg_extension_bm_controls_store+0x10/0x10 [ 117.163232][ T6033] configfs_write_iter+0x337/0x430 [ 117.168346][ T6033] vfs_write+0x612/0xba0 [ 117.172602][ T6033] ? __pfx_vfs_write+0x10/0x10 [ 117.177367][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.183002][ T6033] ? kmem_cache_free+0x182/0x650 [ 117.187947][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.193575][ T6033] ? fdget+0x16b/0x250 [ 117.197642][ T6033] ? srso_alias_return_thunk+0x5/0xfbef5 [ 117.203268][ T6033] ksys_write+0x150/0x270 [ 117.207599][ T6033] ? __pfx_ksys_write+0x10/0x10 [ 117.212450][ T6033] do_syscall_64+0x171/0x540 [ 117.217027][ T6033] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 117.223098][ T6033] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 117.228982][ T6033] RIP: 0033:0x7fd83eb266b7 [ 117.233397][ T6033] Code: 48 89 fa 4c 89 df e8 98 1d 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff [ 117.252990][ T6033] RSP: 002b:00007ffc77379e70 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 117.261394][ T6033] RAX: ffffffffffffffda RBX: 000055556808f400 RCX: 00007fd83eb266b7 [ 117.269351][ T6033] RDX: 0000000000000002 RSI: 00007fd83eb62174 RDI: 0000000000000003 [ 117.277312][ T6033] RBP: 00007fd83eb64c38 R08: 0000000000000000 R09: 0000000000000000 [+] write to /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/extensions/ext.0/bmControls successful (Edge #0 executed, circular dependency triggered). [+] close /sys/kernel/config/usb_gadget/g1/functions/uvc.usb0/control/extensions/ext.0/bmControls fd successful. [*] [After write] lockdep debug_locks status: 0 [ 117.285272][ T6033] R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffc77379f50 [ 117.293229][ T6033] R13: 0000555568090db0 R14: 000055556808f3d8 R15: 0000555568098e4b [ 117.301202][ T6033] [+] Reproducer finished.