[v5.15] possible deadlock in uvcg_streaming_header_allow_link

0 views
Skip to first unread message

syzbot

unread,
Jul 25, 2026, 5:58:36 AM (5 days ago) Jul 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 674f684f7c61 Linux 5.15.212
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1235c7b1580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f161cbc9aef65db0
dashboard link: https://syzkaller.appspot.com/bug?extid=bc03bb5f2dbff6d1ecb9
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f55be2937b89/disk-674f684f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a19fb0ffc049/vmlinux-674f684f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/365d4529a007/bzImage-674f684f.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bc03bb...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.8.661/7105 is trying to acquire lock:
ffffffff8ceceff0 (gadget_subsys.su_mutex){+.+.}-{3:3}, at: uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:942

but task is already holding lock:
ffff888072aec150 (&sb->s_type->i_mutex_key#26){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff888072aec150 (&sb->s_type->i_mutex_key#26){++++}-{3:3}, at: configfs_symlink+0x47b/0x13b0 fs/configfs/symlink.c:192

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&sb->s_type->i_mutex_key#26){++++}-{3:3}:
down_write+0x38/0x60 kernel/locking/rwsem.c:1551
inode_lock include/linux/fs.h:787 [inline]
configfs_depend_item_unlocked+0x14f/0x430 fs/configfs/dir.c:1255
usbg_make_tpg+0x1f3/0x580 drivers/usb/gadget/function/f_tcm.c:1351
target_fabric_make_tpg+0xa0/0x6d0 drivers/target/target_core_fabric_configfs.c:837
configfs_mkdir+0x511/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x386/0x570 fs/namei.c:4073
do_mkdirat+0x1dd/0x5c0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x85/0x90 fs/namei.c:4111
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #1 (&opts->dep_lock){+.+.}-{3:3}:
__mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
tcm_set_name+0x26/0x90 drivers/usb/gadget/function/f_tcm.c:2224
function_make+0x195/0x350 drivers/usb/gadget/configfs.c:620
configfs_mkdir+0x511/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x386/0x570 fs/namei.c:4073
do_mkdirat+0x1dd/0x5c0 fs/namei.c:4098
__do_sys_mkdirat fs/namei.c:4113 [inline]
__se_sys_mkdirat fs/namei.c:4111 [inline]
__x64_sys_mkdirat+0x85/0x90 fs/namei.c:4111
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (gadget_subsys.su_mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:942
configfs_symlink+0x5a4/0x13b0 fs/configfs/symlink.c:202
vfs_symlink+0x245/0x3d0 fs/namei.c:4437
do_symlinkat+0x1ab/0x6b0 fs/namei.c:4466
__do_sys_symlink fs/namei.c:4488 [inline]
__se_sys_symlink fs/namei.c:4486 [inline]
__x64_sys_symlink+0x7a/0x90 fs/namei.c:4486
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

Chain exists of:
gadget_subsys.su_mutex --> &opts->dep_lock --> &sb->s_type->i_mutex_key#26

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&sb->s_type->i_mutex_key#26);
lock(&opts->dep_lock);
lock(&sb->s_type->i_mutex_key#26);
lock(gadget_subsys.su_mutex);

*** DEADLOCK ***

2 locks held by syz.8.661/7105:
#0: ffff88801d8e4460 (sb_writers#18){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386
#1: ffff888072aec150 (&sb->s_type->i_mutex_key#26){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
#1: ffff888072aec150 (&sb->s_type->i_mutex_key#26){++++}-{3:3}, at: configfs_symlink+0x47b/0x13b0 fs/configfs/symlink.c:192

stack backtrace:
CPU: 0 PID: 7105 Comm: syz.8.661 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c66/0x7b50 kernel/locking/lockdep.c:5012
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:942
configfs_symlink+0x5a4/0x13b0 fs/configfs/symlink.c:202
vfs_symlink+0x245/0x3d0 fs/namei.c:4437
do_symlinkat+0x1ab/0x6b0 fs/namei.c:4466
__do_sys_symlink fs/namei.c:4488 [inline]
__se_sys_symlink fs/namei.c:4486 [inline]
__x64_sys_symlink+0x7a/0x90 fs/namei.c:4486
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f8e3b7bae99
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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f8e39a13028 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007f8e3ba42fa0 RCX: 00007f8e3b7bae99
RDX: 0000000000000000 RSI: 0000200000001500 RDI: 0000200000001400
RBP: 00007f8e3b850eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f8e3ba43038 R14: 00007f8e3ba42fa0 R15: 00007ffc879ccf68
</TASK>
rdma_rxe: ignoring netdev event = 10 for syz_tun
infiniband syz1: set down


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jul 25, 2026, 12:46:33 PM (4 days ago) Jul 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c5596480c50e Linux 6.6.145
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1726b2ea580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=414108a5b9f6e5176d22
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb5cda0a8020/disk-c5596480.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ca05ff2fc502/vmlinux-c5596480.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6daf3255b985/bzImage-c5596480.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+414108...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.5.1240/12267 is trying to acquire lock:
ffffffff8ddf6d10 (gadget_subsys.su_mutex){+.+.}-{3:3}, at: uvcg_streaming_header_allow_link+0x71/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:1747

but task is already holding lock:
ffff88807987dab0 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
ffff88807987dab0 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: configfs_symlink+0x47a/0xfe0 fs/configfs/symlink.c:192

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&sb->s_type->i_mutex_key#20){++++}-{3:3}:
down_write+0x97/0x200 kernel/locking/rwsem.c:1573
inode_lock include/linux/fs.h:804 [inline]
configfs_depend_item_unlocked+0x157/0x430 fs/configfs/dir.c:1255
usbg_make_tpg+0x1f7/0x580 drivers/usb/gadget/function/f_tcm.c:1341
target_fabric_make_tpg+0xa4/0x6d0 drivers/target/target_core_fabric_configfs.c:939
configfs_mkdir+0x515/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x2a5/0x470 fs/namei.c:4125
do_mkdirat+0x1dc/0x450 fs/namei.c:4148
__do_sys_mkdir fs/namei.c:4168 [inline]
__se_sys_mkdir fs/namei.c:4166 [inline]
__x64_sys_mkdir+0x6e/0x80 fs/namei.c:4166
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #1 (&opts->dep_lock){+.+.}-{3:3}:
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
tcm_set_name+0x2a/0x90 drivers/usb/gadget/function/f_tcm.c:2188
function_make+0x199/0x350 drivers/usb/gadget/configfs.c:635
configfs_mkdir+0x515/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x2a5/0x470 fs/namei.c:4125
do_mkdirat+0x1dc/0x450 fs/namei.c:4148
__do_sys_mkdir fs/namei.c:4168 [inline]
__se_sys_mkdir fs/namei.c:4166 [inline]
__x64_sys_mkdir+0x6e/0x80 fs/namei.c:4166
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (gadget_subsys.su_mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
uvcg_streaming_header_allow_link+0x71/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:1747
configfs_symlink+0x5a5/0xfe0 fs/configfs/symlink.c:202
vfs_symlink+0x138/0x2b0 fs/namei.c:4485
do_symlinkat+0x1ba/0x400 fs/namei.c:4511
__do_sys_symlink fs/namei.c:4532 [inline]
__se_sys_symlink fs/namei.c:4530 [inline]
__x64_sys_symlink+0x7e/0x90 fs/namei.c:4530
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
gadget_subsys.su_mutex --> &opts->dep_lock --> &sb->s_type->i_mutex_key#20

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&sb->s_type->i_mutex_key#20);
lock(&opts->dep_lock);
lock(&sb->s_type->i_mutex_key#20);
lock(gadget_subsys.su_mutex);

*** DEADLOCK ***

2 locks held by syz.5.1240/12267:
#0: ffff8881436ea418 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:412
#1: ffff88807987dab0 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#1: ffff88807987dab0 (&sb->s_type->i_mutex_key#20){++++}-{3:3}, at: configfs_symlink+0x47a/0xfe0 fs/configfs/symlink.c:192

stack backtrace:
CPU: 1 PID: 12267 Comm: syz.5.1240 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
uvcg_streaming_header_allow_link+0x71/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:1747
configfs_symlink+0x5a5/0xfe0 fs/configfs/symlink.c:202
vfs_symlink+0x138/0x2b0 fs/namei.c:4485
do_symlinkat+0x1ba/0x400 fs/namei.c:4511
__do_sys_symlink fs/namei.c:4532 [inline]
__se_sys_symlink fs/namei.c:4530 [inline]
__x64_sys_symlink+0x7e/0x90 fs/namei.c:4530
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f632d59de99
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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f632e52b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007f632d825fa0 RCX: 00007f632d59de99
RDX: 0000000000000000 RSI: 0000200000001500 RDI: 0000200000001400
RBP: 00007f632d633eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f632d826038 R14: 00007f632d825fa0 R15: 00007ffc57ffa948
</TASK>

syzbot

unread,
Jul 29, 2026, 5:31:33 AM (19 hours ago) Jul 29
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: dc5c83b7f5f8 Linux 6.1.178
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ad09b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link: https://syzkaller.appspot.com/bug?extid=bf5eed720b43e7e2b119
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a9aa438e39c2/disk-dc5c83b7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a7b5afd2e170/vmlinux-dc5c83b7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3c7673d370fb/bzImage-dc5c83b7.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bf5eed...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.90/4712 is trying to acquire lock:
ffffffff8d7b2f90 (gadget_subsys.su_mutex){+.+.}-{3:3}, at: uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:884

but task is already holding lock:
ffff888054616ee0 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
ffff888054616ee0 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: configfs_symlink+0x47b/0x13c0 fs/configfs/symlink.c:192

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}:
down_write+0x36/0x60 kernel/locking/rwsem.c:1573
inode_lock include/linux/fs.h:758 [inline]
configfs_depend_item_unlocked+0x14f/0x430 fs/configfs/dir.c:1255
usbg_make_tpg+0x1f3/0x580 drivers/usb/gadget/function/f_tcm.c:1365
target_fabric_make_tpg+0xa0/0x6d0 drivers/target/target_core_fabric_configfs.c:905
configfs_mkdir+0x511/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x386/0x570 fs/namei.c:4114
do_mkdirat+0x1d8/0x440 fs/namei.c:4139
__do_sys_mkdir fs/namei.c:4159 [inline]
__se_sys_mkdir fs/namei.c:4157 [inline]
__x64_sys_mkdir+0x6a/0x80 fs/namei.c:4157
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #1 (&opts->dep_lock){+.+.}-{3:3}:
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
tcm_set_name+0x26/0x90 drivers/usb/gadget/function/f_tcm.c:2219
function_make+0x195/0x350 drivers/usb/gadget/configfs.c:625
configfs_mkdir+0x511/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x386/0x570 fs/namei.c:4114
do_mkdirat+0x1d8/0x440 fs/namei.c:4139
__do_sys_mkdir fs/namei.c:4159 [inline]
__se_sys_mkdir fs/namei.c:4157 [inline]
__x64_sys_mkdir+0x6a/0x80 fs/namei.c:4157
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (gadget_subsys.su_mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:884
configfs_symlink+0x5a4/0x13c0 fs/configfs/symlink.c:202
vfs_symlink+0x245/0x3d0 fs/namei.c:4479
do_symlinkat+0x1b6/0x400 fs/namei.c:4508
__do_sys_symlink fs/namei.c:4530 [inline]
__se_sys_symlink fs/namei.c:4528 [inline]
__x64_sys_symlink+0x7a/0x90 fs/namei.c:4528
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
gadget_subsys.su_mutex --> &opts->dep_lock --> &sb->s_type->i_mutex_key#23

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&sb->s_type->i_mutex_key#23);
lock(&opts->dep_lock);
lock(&sb->s_type->i_mutex_key#23);
lock(gadget_subsys.su_mutex);

*** DEADLOCK ***

2 locks held by syz.2.90/4712:
#0: ffff888145ed0460 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:402
#1: ffff888054616ee0 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
#1: ffff888054616ee0 (&sb->s_type->i_mutex_key#23){+.+.}-{3:3}, at: configfs_symlink+0x47b/0x13c0 fs/configfs/symlink.c:192

stack backtrace:
CPU: 1 PID: 4712 Comm: syz.2.90 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
uvcg_streaming_header_allow_link+0x6d/0x4a0 drivers/usb/gadget/function/uvc_configfs.c:884
configfs_symlink+0x5a4/0x13c0 fs/configfs/symlink.c:202
vfs_symlink+0x245/0x3d0 fs/namei.c:4479
do_symlinkat+0x1b6/0x400 fs/namei.c:4508
__do_sys_symlink fs/namei.c:4530 [inline]
__se_sys_symlink fs/namei.c:4528 [inline]
__x64_sys_symlink+0x7a/0x90 fs/namei.c:4528
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f797379de99
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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f79745d3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007f7973a25fa0 RCX: 00007f797379de99
RDX: 0000000000000000 RSI: 0000200000001500 RDI: 0000200000001400
RBP: 00007f7973833eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7973a26038 R14: 00007f7973a25fa0 R15: 00007ffee19396e8
Reply all
Reply to author
Forward
0 new messages