REISERFS (device loop6): Using r5 hash to sort names REISERFS (device loop6): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.6.252/6273 is trying to acquire lock: ffff0000e1fe3140 (&type->i_mutex_dir_key#14){++++}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] ffff0000e1fe3140 (&type->i_mutex_dir_key#14){++++}-{3:3}, at: vfs_rename+0x670/0xdcc fs/namei.c:4839 but task is already holding lock: ffff0000e1fe2aa0 (&type->i_mutex_dir_key#14/2){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] ffff0000e1fe2aa0 (&type->i_mutex_dir_key#14/2){+.+.}-{3:3}, at: vfs_rename+0x60c/0xdcc fs/namei.c:4837 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&type->i_mutex_dir_key#14/2){+.+.}-{3:3}: down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:793 [inline] xattr_rmdir fs/reiserfs/xattr.c:106 [inline] delete_one_xattr+0xe8/0x2c8 fs/reiserfs/xattr.c:338 reiserfs_for_each_xattr+0x568/0x68c fs/reiserfs/xattr.c:311 reiserfs_delete_xattrs+0x2c/0xa4 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x1d8/0x3e8 fs/reiserfs/inode.c:53 evict+0x3c8/0x810 fs/inode.c:705 iput_final fs/inode.c:1834 [inline] iput+0x764/0x7f4 fs/inode.c:1860 dentry_unlink_inode+0x360/0x438 fs/dcache.c:405 __dentry_kill+0x320/0x598 fs/dcache.c:611 dentry_kill+0xc8/0x248 fs/dcache.c:-1 dput+0x238/0x454 fs/dcache.c:918 ovl_free_fs+0xdc/0x5a4 fs/overlayfs/super.c:232 ovl_put_super+0x40/0x50 fs/overlayfs/super.c:264 generic_shutdown_super+0x130/0x324 fs/super.c:501 kill_anon_super+0x4c/0x80 fs/super.c:1128 deactivate_locked_super+0xac/0x124 fs/super.c:332 deactivate_super+0xe8/0x108 fs/super.c:363 cleanup_mnt+0x37c/0x404 fs/namespace.c:1182 __cleanup_mnt+0x20/0x30 fs/namespace.c:1189 task_work_run+0x1ec/0x270 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x1f70/0x2b0c arch/arm64/kernel/signal.c:1137 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #1 (&type->i_mutex_dir_key#14/3){+.+.}-{3:3}: down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:793 [inline] open_xa_root fs/reiserfs/xattr.c:127 [inline] open_xa_dir+0x118/0x5d4 fs/reiserfs/xattr.c:152 xattr_lookup+0x3c/0x268 fs/reiserfs/xattr.c:395 reiserfs_xattr_get+0xf0/0x924 fs/reiserfs/xattr.c:677 reiserfs_get_acl+0x94/0x614 fs/reiserfs/xattr_acl.c:214 get_acl+0x160/0x33c fs/posix_acl.c:153 reiserfs_cache_default_acl+0x74/0x45c fs/reiserfs/xattr_acl.c:374 reiserfs_create+0x208/0x5a8 fs/reiserfs/namei.c:652 lookup_open fs/namei.c:3482 [inline] open_last_lookups fs/namei.c:3550 [inline] path_openat+0x112c/0x2680 fs/namei.c:3780 do_filp_open+0x174/0x344 fs/namei.c:3810 do_sys_openat2+0x128/0x3d8 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_openat fs/open.c:1350 [inline] __se_sys_openat fs/open.c:1345 [inline] __arm64_sys_openat+0x120/0x154 fs/open.c:1345 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (&type->i_mutex_dir_key#14){++++}-{3:3}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x293c/0x6544 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x644 kernel/locking/lockdep.c:5662 down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] vfs_rename+0x670/0xdcc fs/namei.c:4839 do_renameat2+0x738/0xa54 fs/namei.c:5027 __do_sys_renameat2 fs/namei.c:5060 [inline] __se_sys_renameat2 fs/namei.c:5057 [inline] __arm64_sys_renameat2+0xe0/0xfc fs/namei.c:5057 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 other info that might help us debug this: Chain exists of: &type->i_mutex_dir_key#14 --> &type->i_mutex_dir_key#14/3 --> &type->i_mutex_dir_key#14/2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->i_mutex_dir_key#14/2); lock(&type->i_mutex_dir_key#14/3); lock(&type->i_mutex_dir_key#14/2); lock(&type->i_mutex_dir_key#14); *** DEADLOCK *** 5 locks held by syz.6.252/6273: #0: ffff0000daef6460 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393 #1: ffff0000daef6748 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: lock_rename fs/namei.c:3038 [inline] #1: ffff0000daef6748 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: do_renameat2+0x2fc/0xa54 fs/namei.c:4966 #2: ffff0000e1fe16c0 (&type->i_mutex_dir_key#14/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] #2: ffff0000e1fe16c0 (&type->i_mutex_dir_key#14/1){+.+.}-{3:3}, at: lock_two_directories fs/namei.c:-1 [inline] #2: ffff0000e1fe16c0 (&type->i_mutex_dir_key#14/1){+.+.}-{3:3}, at: lock_rename fs/namei.c:3039 [inline] #2: ffff0000e1fe16c0 (&type->i_mutex_dir_key#14/1){+.+.}-{3:3}, at: do_renameat2+0x378/0xa54 fs/namei.c:4966 #3: ffff0000e1fe2400 (&type->i_mutex_dir_key#14/5){+.+.}-{3:3}, at: lock_rename include/linux/fs.h:-1 [inline] #3: ffff0000e1fe2400 (&type->i_mutex_dir_key#14/5){+.+.}-{3:3}, at: do_renameat2+0x3ac/0xa54 fs/namei.c:4966 #4: ffff0000e1fe2aa0 (&type->i_mutex_dir_key#14/2){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] #4: ffff0000e1fe2aa0 (&type->i_mutex_dir_key#14/2){+.+.}-{3:3}, at: vfs_rename+0x60c/0xdcc fs/namei.c:4837 stack backtrace: CPU: 1 PID: 6273 Comm: syz.6.252 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x240/0x2d4 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x293c/0x6544 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x644 kernel/locking/lockdep.c:5662 down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] vfs_rename+0x670/0xdcc fs/namei.c:4839 do_renameat2+0x738/0xa54 fs/namei.c:5027 __do_sys_renameat2 fs/namei.c:5060 [inline] __se_sys_renameat2 fs/namei.c:5057 [inline] __arm64_sys_renameat2+0xe0/0xfc fs/namei.c:5057 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585