REISERFS (device loop3): Using r5 hash to sort names REISERFS warning (device loop3): vs-13060 reiserfs_update_sd_size: stat data of object [1 2 0x0 SD] (nlink == 1) not found (pos 2) REISERFS (device loop3): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 6.6.101-syzkaller #0 Not tainted ------------------------------------------------------ syz.3.5170/24962 is trying to acquire lock: ffff88805d169d70 (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] ffff88805d169d70 (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:128 [inline] ffff88805d169d70 (&type->i_mutex_dir_key#10/3){+.+.}-{3:3}, at: open_xa_dir+0x122/0x6f0 fs/reiserfs/xattr.c:153 but task is already holding lock: ffff8880788ef090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x60/0xd0 fs/reiserfs/lock.c:78 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sbi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x129/0xcc0 kernel/locking/mutex.c:747 reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x310/0x970 fs/reiserfs/namei.c:829 xattr_mkdir fs/reiserfs/xattr.c:77 [inline] open_xa_root fs/reiserfs/xattr.c:137 [inline] open_xa_dir+0x31a/0x6f0 fs/reiserfs/xattr.c:153 xattr_lookup+0x22/0x2a0 fs/reiserfs/xattr.c:396 reiserfs_xattr_set_handle+0xf9/0xd40 fs/reiserfs/xattr.c:535 reiserfs_xattr_set+0x439/0x550 fs/reiserfs/xattr.c:635 __vfs_setxattr+0x431/0x470 fs/xattr.c:201 __vfs_setxattr_noperm+0x12d/0x5e0 fs/xattr.c:235 vfs_setxattr+0x16c/0x2f0 fs/xattr.c:322 do_setxattr fs/xattr.c:630 [inline] path_setxattr+0x362/0x550 fs/xattr.c:659 __do_sys_setxattr fs/xattr.c:677 [inline] __se_sys_setxattr fs/xattr.c:673 [inline] __x64_sys_setxattr+0xbb/0xd0 fs/xattr.c:673 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&type->i_mutex_dir_key#10/3){+.+.}-{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+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 down_write_nested+0x9e/0x1f0 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:839 [inline] open_xa_root fs/reiserfs/xattr.c:128 [inline] open_xa_dir+0x122/0x6f0 fs/reiserfs/xattr.c:153 reiserfs_for_each_xattr+0x17b/0x960 fs/reiserfs/xattr.c:253 reiserfs_delete_xattrs+0x20/0x90 fs/reiserfs/xattr.c:365 reiserfs_evict_inode+0x225/0x490 fs/reiserfs/inode.c:53 evict+0x486/0x870 fs/inode.c:705 reiserfs_new_inode+0x5cc/0x17d0 fs/reiserfs/inode.c:2152 reiserfs_symlink+0x4f9/0x7b0 fs/reiserfs/namei.c:1167 vfs_symlink+0x138/0x2b0 fs/namei.c:4473 do_symlinkat+0x1b2/0x3f0 fs/namei.c:4499 __do_sys_symlink fs/namei.c:4520 [inline] __se_sys_symlink fs/namei.c:4518 [inline] __x64_sys_symlink+0x7e/0x90 fs/namei.c:4518 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->lock); lock(&type->i_mutex_dir_key#10/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#10/3); *** DEADLOCK *** 3 locks held by syz.3.5170/24962: #0: ffff88802d572418 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:403 #1: ffff88805d169030 (&type->i_mutex_dir_key#10/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] #1: ffff88805d169030 (&type->i_mutex_dir_key#10/1){+.+.}-{3:3}, at: filename_create+0x1f6/0x460 fs/namei.c:3882 #2: ffff8880788ef090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x60/0xd0 fs/reiserfs/lock.c:78 stack backtrace: CPU: 1 PID: 24962 Comm: syz.3.5170 Not tainted 6.6.101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_noncircular+0x2bd/0x3c0 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+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 down_write_nested+0x9e/0x1f0 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:839 [inline] open_xa_root fs/reiserfs/xattr.c:128 [inline] open_xa_dir+0x122/0x6f0 fs/reiserfs/xattr.c:153 reiserfs_for_each_xattr+0x17b/0x960 fs/reiserfs/xattr.c:253 reiserfs_delete_xattrs+0x20/0x90 fs/reiserfs/xattr.c:365 reiserfs_evict_inode+0x225/0x490 fs/reiserfs/inode.c:53 evict+0x486/0x870 fs/inode.c:705 reiserfs_new_inode+0x5cc/0x17d0 fs/reiserfs/inode.c:2152 reiserfs_symlink+0x4f9/0x7b0 fs/reiserfs/namei.c:1167 vfs_symlink+0x138/0x2b0 fs/namei.c:4473 do_symlinkat+0x1b2/0x3f0 fs/namei.c:4499 __do_sys_symlink fs/namei.c:4520 [inline] __se_sys_symlink fs/namei.c:4518 [inline] __x64_sys_symlink+0x7e/0x90 fs/namei.c:4518 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f98ef78eb69 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f98f05b1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 00007f98ef9b5fa0 RCX: 00007f98ef78eb69 RDX: 0000000000000000 RSI: 0000200000000cc0 RDI: 000020000000a900 RBP: 00007f98ef811df1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f98ef9b5fa0 R15: 00007fffb49d6df8