possible deadlock in vfs_rename (3)

Status: upstream: reported C repro on 2026/09/23 18:33
Subsystems: ocfs2
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+c73ff6790f3d6c635abc@syzkaller.appspotmail.com
First crash: 50d, last: 19d
Cause bisection: failed (error log, bisect log)
  
▶ ▼ ✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision
1a8a3be3 repro-c 💥 possible deadlock in vfs_rename (3) 2026/10/07 08:53 2026/10/07 08:53 2026/10/07 11:54 f7710056
da645ba7 repro-c 💥 possible deadlock in vfs_rename (3) 2026/10/05 20:46 2026/10/05 20:46 2026/10/06 01:37 1995e6c7
b7f75b7b assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ possible deadlock in vfs_rename (3) 2026/09/21 00:02 2026/09/21 00:02 2026/09/21 00:49 853b104b
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ocfs2?] possible deadlock in vfs_rename (3) 0 (2) 2026/10/20 00:11
▶ ▼ Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in vfs_rename 4 13 601d 914d 0/3 auto-obsoleted due to no activity on 2025/06/25 12:29
upstream possible deadlock in vfs_rename kernel 4 1 1369d 1369d 0/29 closed as invalid on 2023/02/08 16:28
linux-6.1 possible deadlock in vfs_rename (2) origin:lts-only 4 syz, C inconclusive 31 31d 677d 0/3 upstream: reported C repro on 2024/12/31 00:31
linux-5.15 possible deadlock in vfs_rename (2) 4 1 460d 460d 0/3 auto-obsoleted due to no activity on 2025/11/13 14:59
linux-6.1 possible deadlock in vfs_rename 4 8 783d 818d 0/3 auto-obsoleted due to no activity on 2024/12/25 19:29
linux-6.6 possible deadlock in vfs_rename 4 1 357d 357d 0/2 auto-obsoleted due to no activity on 2026/02/24 07:36
upstream possible deadlock in vfs_rename (2) ntfs3 4 3 660d 708d 0/29 auto-obsoleted due to no activity on 2025/04/27 15:12
▶ ▼ Cause bisection attempts (2)
Created Duration User Patch Repo Result
2026/10/28 12:39 13m bisect upstream error job log
2026/10/21 11:01 0m bisect upstream error

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz-executor105/5623 is trying to acquire lock:
ffff8880767009a0 (&sb->s_type->i_mutex_key#18){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1024 [inline]
ffff8880767009a0 (&sb->s_type->i_mutex_key#18){+.+.}-{4:4}, at: vfs_rename+0x6e3/0xef0 fs/namei.c:-1

but task is already holding lock:
ffff8880764ff9a0 (&sb->s_type->i_mutex_key#18/2){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline]
ffff8880764ff9a0 (&sb->s_type->i_mutex_key#18/2){+.+.}-{4:4}, at: vfs_rename+0x64d/0xef0 fs/namei.c:6159

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&sb->s_type->i_mutex_key#18/2){+.+.}-{4:4}:
       down_write_nested+0x9d/0x210 kernel/locking/rwsem.c:1757
       inode_lock_nested include/linux/fs.h:1069 [inline]
       __ocfs2_reflink+0xcab/0x16e0 fs/ocfs2/refcounttree.c:4198
       ocfs2_reflink+0x4eb/0x920 fs/ocfs2/refcounttree.c:4297
       ocfs2_vfs_reflink+0x338/0x450 fs/ocfs2/refcounttree.c:4423
       ocfs2_reflink_ioctl+0x3a0/0x450 fs/ocfs2/refcounttree.c:4463
       ocfs2_ioctl+0x5b5/0x7e0 fs/ocfs2/ioctl.c:920
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&oi->ip_alloc_sem){+.+.}-{4:4}:
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       ocfs2_reflink+0x4d2/0x920 fs/ocfs2/refcounttree.c:4296
       ocfs2_vfs_reflink+0x338/0x450 fs/ocfs2/refcounttree.c:4423
       ocfs2_reflink_ioctl+0x3a0/0x450 fs/ocfs2/refcounttree.c:4463
       ocfs2_ioctl+0x5b5/0x7e0 fs/ocfs2/ioctl.c:920
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&oi->ip_xattr_sem){++++}-{4:4}:
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       ocfs2_reflink+0x4c3/0x920 fs/ocfs2/refcounttree.c:4295
       ocfs2_vfs_reflink+0x338/0x450 fs/ocfs2/refcounttree.c:4423
       ocfs2_reflink_ioctl+0x3a0/0x450 fs/ocfs2/refcounttree.c:4463
       ocfs2_ioctl+0x5b5/0x7e0 fs/ocfs2/ioctl.c:920
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:597 [inline]
       __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&sb->s_type->i_mutex_key#18){+.+.}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3209 [inline]
       check_prevs_add kernel/locking/lockdep.c:3328 [inline]
       validate_chain kernel/locking/lockdep.c:3952 [inline]
       __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
       lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
       down_write+0x96/0x200 kernel/locking/rwsem.c:1631
       inode_lock include/linux/fs.h:1024 [inline]
       vfs_rename+0x6e3/0xef0 fs/namei.c:-1
       filename_renameat2+0x533/0x9a0 fs/namei.c:6325
       __do_sys_rename fs/namei.c:6369 [inline]
       __se_sys_rename+0x55/0x2c0 fs/namei.c:6365
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &sb->s_type->i_mutex_key#18 --> &oi->ip_alloc_sem --> &sb->s_type->i_mutex_key#18/2

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sb->s_type->i_mutex_key#18/2);
                               lock(&oi->ip_alloc_sem);
                               lock(&sb->s_type->i_mutex_key#18/2);
  lock(&sb->s_type->i_mutex_key#18);

 *** DEADLOCK ***

locks held by syz-executor105/5623: 5, last CPU#1:
 #0: ffff88807f244460 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
 #1: ffff88807f244768 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: lock_rename fs/namei.c:3789 [inline]
 #1: ffff88807f244768 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: __start_renaming+0xed/0x410 fs/namei.c:3878
 #2: ffff8880767025a0 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline]
 #2: ffff8880767025a0 (&type->i_mutex_dir_key#6/1){+.+.}-{4:4}, at: lock_two_directories+0x141/0x220 fs/namei.c:3755
 #3: ffff8880767017a0 (&sb->s_type->i_mutex_key#18/5){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline]
 #3: ffff8880767017a0 (&sb->s_type->i_mutex_key#18/5){+.+.}-{4:4}, at: lock_two_directories+0x16b/0x220 fs/namei.c:3756
 #4: ffff8880764ff9a0 (&sb->s_type->i_mutex_key#18/2){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1069 [inline]
 #4: ffff8880764ff9a0 (&sb->s_type->i_mutex_key#18/2){+.+.}-{4:4}, at: vfs_rename+0x64d/0xef0 fs/namei.c:6159

stack backtrace:
CPU: 1 UID: 0 PID: 5623 Comm: syz-executor105 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
 check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
 check_prev_add kernel/locking/lockdep.c:3209 [inline]
 check_prevs_add kernel/locking/lockdep.c:3328 [inline]
 validate_chain kernel/locking/lockdep.c:3952 [inline]
 __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
 down_write+0x96/0x200 kernel/locking/rwsem.c:1631
 inode_lock include/linux/fs.h:1024 [inline]
 vfs_rename+0x6e3/0xef0 fs/namei.c:-1
 filename_renameat2+0x533/0x9a0 fs/namei.c:6325
 __do_sys_rename fs/namei.c:6369 [inline]
 __se_sys_rename+0x55/0x2c0 fs/namei.c:6365
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5228311de9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd98464798 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5228311de9
RDX: 69662f7375622f2e RSI: 0000200000002bc0 RDI: 0000200000002b80
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffd984647d0
R10: 00007ffd984647a0 R11: 0000000000000246 R12: 00007ffd984647d0
R13: 0000000000000002 R14: 431bde82d7b634db R15: 00007f522837104b
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/20 00:10 upstream c03c1a14507d 72cdc28d .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci-upstream-kasan-gce-root possible deadlock in vfs_rename
2026/10/19 18:58 upstream c03c1a14507d 72cdc28d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in vfs_rename
2026/10/19 18:58 upstream c03c1a14507d 72cdc28d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in vfs_rename
2026/09/19 18:24 upstream 40288c9206c1 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in vfs_rename
2026/09/19 18:24 upstream 40288c9206c1 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in vfs_rename
* Struck through repros no longer work on HEAD.