REISERFS (device loop2): checking transaction log (loop2) REISERFS (device loop2): Using tea hash to sort names REISERFS (device loop2): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.2.341/7671 is trying to acquire lock: ffff88807f716090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 but task is already holding lock: ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:128 [inline] ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: open_xa_dir+0x146/0x700 fs/reiserfs/xattr.c:153 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}: down_write_nested+0x9e/0x200 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+0x146/0x700 fs/reiserfs/xattr.c:153 reiserfs_for_each_xattr+0x1bd/0x9f0 fs/reiserfs/xattr.c:253 reiserfs_delete_xattrs+0x20/0x90 fs/reiserfs/xattr.c:365 reiserfs_evict_inode+0x24f/0x4c0 fs/reiserfs/inode.c:53 evict+0x4ca/0x8d0 fs/inode.c:705 reiserfs_create+0x353/0x690 fs/reiserfs/namei.c:-1 vfs_create+0x1f4/0x360 fs/namei.c:3198 do_mknodat+0x3d0/0x500 fs/namei.c:4049 __do_sys_mknodat fs/namei.c:4077 [inline] __se_sys_mknodat fs/namei.c:4074 [inline] __x64_sys_mknodat+0xa9/0xc0 fs/namei.c:4074 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&sbi->lock){+.+.}-{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+0x2df1/0x7d40 kernel/locking/lockdep.c:5137 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747 reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x30c/0x920 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+0x327/0x700 fs/reiserfs/xattr.c:153 xattr_lookup+0x22/0x2a0 fs/reiserfs/xattr.c:396 reiserfs_xattr_set_handle+0x106/0xd70 fs/reiserfs/xattr.c:535 reiserfs_xattr_set+0x46b/0x590 fs/reiserfs/xattr.c:635 __vfs_setxattr+0x431/0x470 fs/xattr.c:201 __vfs_setxattr_noperm+0x12d/0x5e0 fs/xattr.c:235 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:322 do_setxattr fs/xattr.c:630 [inline] __do_sys_fsetxattr fs/xattr.c:711 [inline] __se_sys_fsetxattr+0x476/0x510 fs/xattr.c:687 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->i_mutex_dir_key#17/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#17/3); lock(&sbi->lock); *** DEADLOCK *** 3 locks held by syz.2.341/7671: #0: ffff888026260418 (sb_writers#22){.+.+}-{0:0}, at: mnt_want_write_file+0x63/0x200 fs/namespace.c:456 #1: ffff8880570116d0 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] #1: ffff8880570116d0 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: vfs_setxattr+0x144/0x2f0 fs/xattr.c:321 #2: ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:839 [inline] #2: ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:128 [inline] #2: ffff888057011030 (&type->i_mutex_dir_key#17/3){+.+.}-{3:3}, at: open_xa_dir+0x146/0x700 fs/reiserfs/xattr.c:153 stack backtrace: CPU: 1 PID: 7671 Comm: syz.2.341 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 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+0x2df1/0x7d40 kernel/locking/lockdep.c:5137 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747 reiserfs_write_lock+0x79/0xd0 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x30c/0x920 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+0x327/0x700 fs/reiserfs/xattr.c:153 xattr_lookup+0x22/0x2a0 fs/reiserfs/xattr.c:396 reiserfs_xattr_set_handle+0x106/0xd70 fs/reiserfs/xattr.c:535 reiserfs_xattr_set+0x46b/0x590 fs/reiserfs/xattr.c:635 __vfs_setxattr+0x431/0x470 fs/xattr.c:201 __vfs_setxattr_noperm+0x12d/0x5e0 fs/xattr.c:235 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:322 do_setxattr fs/xattr.c:630 [inline] __do_sys_fsetxattr fs/xattr.c:711 [inline] __se_sys_fsetxattr+0x476/0x510 fs/xattr.c:687 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f066679acb9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f06675e7028 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 00007f0666a15fa0 RCX: 00007f066679acb9 RDX: 0000000000000000 RSI: 0000200000000180 RDI: 0000000000000004 RBP: 00007f0666808bf7 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0666a16038 R14: 00007f0666a15fa0 R15: 00007ffd03e85a08