REISERFS warning: reiserfs-5082 is_leaf: free space seems wrong: level=1, nr_items=5, free_space=65528 rdkey REISERFS error (device loop3): vs-5150 search_by_key: invalid format found in block 534. Fsck? REISERFS (device loop3): Remounting filesystem read-only REISERFS error (device loop3): vs-13080 reiserfs_new_directory: i/o failure occurred creating new directory ====================================================== WARNING: possible circular locking dependency detected 6.6.98-syzkaller #0 Not tainted ------------------------------------------------------ syz.3.284/6781 is trying to acquire lock: ffff88805e3fb7f0 (&type->i_mutex_dir_key#9/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] ffff88805e3fb7f0 (&type->i_mutex_dir_key#9/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:128 [inline] ffff88805e3fb7f0 (&type->i_mutex_dir_key#9/3){+.+.}-{3:3}, at: open_xa_dir+0x122/0x6f0 fs/reiserfs/xattr.c:153 but task is already holding lock: ffff8880792ff090 (&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] __do_sys_fsetxattr fs/xattr.c:711 [inline] __se_sys_fsetxattr+0x426/0x4b0 fs/xattr.c:687 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#9/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_mkdir+0x55b/0x970 fs/reiserfs/namei.c:843 vfs_mkdir+0x296/0x440 fs/namei.c:4113 do_mkdirat+0x1d4/0x440 fs/namei.c:4136 __do_sys_mkdirat fs/namei.c:4151 [inline] __se_sys_mkdirat fs/namei.c:4149 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4149 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#9/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#9/3); *** DEADLOCK *** 3 locks held by syz.3.284/6781: #0: ffff88803256a418 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:403 #1: ffff88805e3fb150 (&type->i_mutex_dir_key#9/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] #1: ffff88805e3fb150 (&type->i_mutex_dir_key#9/1){+.+.}-{3:3}, at: filename_create+0x1f6/0x460 fs/namei.c:3882 #2: ffff8880792ff090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x60/0xd0 fs/reiserfs/lock.c:78 stack backtrace: CPU: 1 PID: 6781 Comm: syz.3.284 Not tainted 6.6.98-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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_mkdir+0x55b/0x970 fs/reiserfs/namei.c:843 vfs_mkdir+0x296/0x440 fs/namei.c:4113 do_mkdirat+0x1d4/0x440 fs/namei.c:4136 __do_sys_mkdirat fs/namei.c:4151 [inline] __se_sys_mkdirat fs/namei.c:4149 [inline] __x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4149 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:0x7fc2c618d197 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007fc2c5ffee68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007fc2c5ffeef0 RCX: 00007fc2c618d197 RDX: 00000000000001ff RSI: 00002000000016c0 RDI: 00000000ffffff9c RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00002000000016c0 R13: 00007fc2c5ffeeb0 R14: 0000000000000000 R15: 0000000000000000