====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.1/4397 is trying to acquire lock: ffff888055518980 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:799 [inline] ffff888055518980 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:127 [inline] ffff888055518980 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}, at: open_xa_dir+0x142/0x6f0 fs/reiserfs/xattr.c:152 but task is already holding lock: ffff888078e5f090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x5c/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+0x12d/0xb40 kernel/locking/mutex.c:747 reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x306/0x920 fs/reiserfs/namei.c:831 xattr_mkdir fs/reiserfs/xattr.c:76 [inline] open_xa_root fs/reiserfs/xattr.c:136 [inline] open_xa_dir+0x323/0x6f0 fs/reiserfs/xattr.c:152 xattr_lookup+0x22/0x2a0 fs/reiserfs/xattr.c:395 reiserfs_xattr_set_handle+0x117/0xd50 fs/reiserfs/xattr.c:533 __reiserfs_set_acl+0x562/0x6f0 fs/reiserfs/xattr_acl.c:276 reiserfs_set_acl+0x477/0x650 fs/reiserfs/xattr_acl.c:50 set_posix_acl fs/posix_acl.c:1160 [inline] posix_acl_xattr_set+0x388/0x3f0 fs/posix_acl.c:1189 __vfs_setxattr+0x3d8/0x410 fs/xattr.c:182 __vfs_setxattr_noperm+0x126/0x5e0 fs/xattr.c:216 vfs_setxattr+0x167/0x2e0 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x2a3/0x330 fs/xattr.c:617 __do_sys_fsetxattr fs/xattr.c:673 [inline] __se_sys_fsetxattr+0x15e/0x1d0 fs/xattr.c:662 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&type->i_mutex_dir_key#8/3){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 down_write_nested+0x39/0x60 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:799 [inline] open_xa_root fs/reiserfs/xattr.c:127 [inline] open_xa_dir+0x142/0x6f0 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x1cc/0x810 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x1c/0x80 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x246/0x4b0 fs/reiserfs/inode.c:53 evict+0x4b2/0x9d0 fs/inode.c:703 reiserfs_new_inode+0x60c/0x1940 fs/reiserfs/inode.c:2156 reiserfs_create+0x406/0x6e0 fs/reiserfs/namei.c:668 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3835 do_filp_open+0x1ee/0x420 fs/namei.c:3865 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/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(&sbi->lock); lock(&type->i_mutex_dir_key#8/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#8/3); *** DEADLOCK *** 3 locks held by syz.0.1/4397: #0: ffff8880794d8460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:402 #1: ffff8880555182e0 (&type->i_mutex_dir_key#8){++++}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #1: ffff8880555182e0 (&type->i_mutex_dir_key#8){++++}-{3:3}, at: open_last_lookups fs/namei.c:3598 [inline] #1: ffff8880555182e0 (&type->i_mutex_dir_key#8){++++}-{3:3}, at: path_openat+0x7e8/0x2f10 fs/namei.c:3835 #2: ffff888078e5f090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x5c/0xd0 fs/reiserfs/lock.c:78 stack backtrace: CPU: 0 PID: 4397 Comm: syz.0.1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a03/0x7ea0 kernel/locking/lockdep.c:5171 lock_acquire+0x1bc/0x4a0 kernel/locking/lockdep.c:5790 down_write_nested+0x39/0x60 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:799 [inline] open_xa_root fs/reiserfs/xattr.c:127 [inline] open_xa_dir+0x142/0x6f0 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x1cc/0x810 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x1c/0x80 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x246/0x4b0 fs/reiserfs/inode.c:53 evict+0x4b2/0x9d0 fs/inode.c:703 reiserfs_new_inode+0x60c/0x1940 fs/reiserfs/inode.c:2156 reiserfs_create+0x406/0x6e0 fs/reiserfs/namei.c:668 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3835 do_filp_open+0x1ee/0x420 fs/namei.c:3865 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fea5239fb19 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:00007fea531a2028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fea52626090 RCX: 00007fea5239fb19 RDX: 0000000000040042 RSI: 0000200000001a80 RDI: ffffffffffffff9c RBP: 00007fea52437b70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fea52626128 R14: 00007fea52626090 R15: 00007ffdea21d8e8