====================================================== WARNING: possible circular locking dependency detected 6.1.141-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/5054 is trying to acquire lock: ffff0000e974c520 (&type->i_mutex_dir_key#8/2){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] ffff0000e974c520 (&type->i_mutex_dir_key#8/2){+.+.}-{3:3}, at: xattr_rmdir fs/reiserfs/xattr.c:106 [inline] ffff0000e974c520 (&type->i_mutex_dir_key#8/2){+.+.}-{3:3}, at: delete_one_xattr+0xe8/0x2c8 fs/reiserfs/xattr.c:338 but task is already holding lock: ffff0000e974b140 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] ffff0000e974b140 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}, at: reiserfs_for_each_xattr+0x55c/0x68c fs/reiserfs/xattr.c:309 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&type->i_mutex_dir_key#8/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_set_handle+0xd8/0xd94 fs/reiserfs/xattr.c:533 reiserfs_xattr_set+0x388/0x4a8 fs/reiserfs/xattr.c:633 trusted_set+0x98/0xec fs/reiserfs/xattr_trusted.c:31 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182 __vfs_setxattr_noperm+0x120/0x564 fs/xattr.c:216 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277 vfs_setxattr+0x158/0x2ac fs/xattr.c:309 ovl_do_setxattr fs/overlayfs/overlayfs.h:252 [inline] ovl_setxattr fs/overlayfs/overlayfs.h:264 [inline] ovl_make_workdir fs/overlayfs/super.c:1435 [inline] ovl_get_workdir+0x950/0x1068 fs/overlayfs/super.c:1539 ovl_fill_super+0x139c/0x2294 fs/overlayfs/super.c:2095 mount_nodev+0x68/0x104 fs/super.c:1489 ovl_mount+0x3c/0x50 fs/overlayfs/super.c:2186 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632 vfs_get_tree+0x90/0x274 fs/super.c:1573 do_new_mount+0x228/0x810 fs/namespace.c:3054 path_mount+0x5b4/0xe78 fs/namespace.c:3384 do_mount fs/namespace.c:3397 [inline] __do_sys_mount fs/namespace.c:3605 [inline] __se_sys_mount fs/namespace.c:3582 [inline] __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3582 __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 -> #1 (&type->i_mutex_dir_key#8){++++}-{3:3}: 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 -> #0 ( &type->i_mutex_dir_key#8 /2){+.+.}-{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_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 cleanup_mnt+0x360/0x404 fs/namespace.c:1181 __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 other info that might help us debug this: Chain exists of: &type->i_mutex_dir_key #8 /2 --> &type->i_mutex_dir_key #8 --> &type->i_mutex_dir_key #8/3 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->i_mutex_dir_key #8 /3 ); lock( &type->i_mutex_dir_key#8); lock(&type->i_mutex_dir_key#8/3); lock(&type->i_mutex_dir_key#8/2); *** DEADLOCK *** 1 lock held by syz-executor/5054: #0: ffff0000e974b140 (&type->i_mutex_dir_key #8 /3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] /3){+.+.}-{3:3}, at: reiserfs_for_each_xattr+0x55c/0x68c fs/reiserfs/xattr.c:309 stack backtrace: CPU: 0 PID: 5054 Comm: syz-executor Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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_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 cleanup_mnt+0x360/0x404 fs/namespace.c:1181 __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 REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2) REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 4) not found (pos 2)