====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.3.273/5727 is trying to acquire lock: ffff888071d83140 (&type->i_mutex_dir_key#16/3){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] ffff888071d83140 (&type->i_mutex_dir_key#16/3){+.+.}-{3:3}, at: open_xa_root fs/reiserfs/xattr.c:127 [inline] ffff888071d83140 (&type->i_mutex_dir_key#16/3){+.+.}-{3:3}, at: open_xa_dir+0x11e/0x6f0 fs/reiserfs/xattr.c:152 but task is already holding lock: ffff888024471090 (&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+0x120/0xaf0 kernel/locking/mutex.c:747 reiserfs_write_lock+0x75/0xd0 fs/reiserfs/lock.c:27 reiserfs_mkdir+0x30c/0x970 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+0x316/0x6f0 fs/reiserfs/xattr.c:152 xattr_lookup+0x22/0x2a0 fs/reiserfs/xattr.c:395 reiserfs_xattr_set_handle+0xf3/0xca0 fs/reiserfs/xattr.c:533 __reiserfs_set_acl+0x4ec/0x680 fs/reiserfs/xattr_acl.c:276 reiserfs_set_acl+0x447/0x5f0 fs/reiserfs/xattr_acl.c:50 set_posix_acl fs/posix_acl.c:1160 [inline] posix_acl_xattr_set+0x387/0x3f0 fs/posix_acl.c:1189 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x2b2/0x2d0 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:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&type->i_mutex_dir_key#16/3){+.+.}-{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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 down_write_nested+0x39/0x60 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+0x11e/0x6f0 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x174/0x7b0 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x1c/0x80 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x22e/0x490 fs/reiserfs/inode.c:53 evict+0x485/0x870 fs/inode.c:705 reiserfs_new_inode+0x5c8/0x1860 fs/reiserfs/inode.c:2156 reiserfs_mkdir+0x557/0x970 fs/reiserfs/namei.c:845 vfs_mkdir+0x387/0x570 fs/namei.c:4114 do_mkdirat+0x1d0/0x430 fs/namei.c:4139 __do_sys_mkdirat fs/namei.c:4154 [inline] __se_sys_mkdirat fs/namei.c:4152 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4152 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 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#16/3); lock(&sbi->lock); lock(&type->i_mutex_dir_key#16/3); *** DEADLOCK *** 3 locks held by syz.3.273/5727: #0: ffff88807e67c460 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:402 #1: ffff888071d82aa0 (&type->i_mutex_dir_key#16/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] #1: ffff888071d82aa0 (&type->i_mutex_dir_key#16/1){+.+.}-{3:3}, at: filename_create+0x1f2/0x450 fs/namei.c:3884 #2: ffff888024471090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock_nested+0x5c/0xd0 fs/reiserfs/lock.c:78 stack backtrace: CPU: 1 PID: 5727 Comm: syz.3.273 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 down_write_nested+0x39/0x60 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+0x11e/0x6f0 fs/reiserfs/xattr.c:152 reiserfs_for_each_xattr+0x174/0x7b0 fs/reiserfs/xattr.c:252 reiserfs_delete_xattrs+0x1c/0x80 fs/reiserfs/xattr.c:364 reiserfs_evict_inode+0x22e/0x490 fs/reiserfs/inode.c:53 evict+0x485/0x870 fs/inode.c:705 reiserfs_new_inode+0x5c8/0x1860 fs/reiserfs/inode.c:2156 reiserfs_mkdir+0x557/0x970 fs/reiserfs/namei.c:845 vfs_mkdir+0x387/0x570 fs/namei.c:4114 do_mkdirat+0x1d0/0x430 fs/namei.c:4139 __do_sys_mkdirat fs/namei.c:4154 [inline] __se_sys_mkdirat fs/namei.c:4152 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4152 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5cdd78de97 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:00007f5cde553e68 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 00007f5cde553ef0 RCX: 00007f5cdd78de97 RDX: 00000000000001ff RSI: 00002000000020c0 RDI: 00000000ffffff9c RBP: 0000200000002040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000200000002040 R11: 0000000000000246 R12: 00002000000020c0 R13: 00007f5cde553eb0 R14: 0000000000000000 R15: 00002000000021c0