====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc7-syzkaller-00018-g0983f6bf2bfc #0 Not tainted ------------------------------------------------------ syz-executor.4/10741 is trying to acquire lock: ffff88802c27aaa0 (&sb->s_type->i_mutex_key#35){+.+.}-{3:3}, at: lock_two_nondirectories+0xe2/0x140 but task is already holding lock: ffff88802c27b140 (&type->i_mutex_dir_key#23/2){+.+.}-{3:3}, at: lock_rename+0x172/0x1a0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&type->i_mutex_dir_key#23/2){+.+.}-{3:3}: lock_acquire+0x20b/0x600 down_write_nested+0x3d/0x60 delete_one_xattr+0x106/0x2f0 reiserfs_for_each_xattr+0x9b0/0xb50 reiserfs_delete_xattrs+0x1f/0x90 reiserfs_evict_inode+0x207/0x470 evict+0x2a4/0x620 __dentry_kill+0x436/0x650 dentry_kill+0xbb/0x290 dput+0x1d8/0x3f0 ovl_destroy_inode+0x40/0xf0 evict+0x542/0x620 do_unlinkat+0x4ad/0x8c0 __x64_sys_unlink+0x49/0x50 do_syscall_64+0x41/0xc0 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (&type->i_mutex_dir_key#23/3){+.+.}-{3:3}: lock_acquire+0x20b/0x600 down_write_nested+0x3d/0x60 open_xa_dir+0x122/0x650 xattr_lookup+0x24/0x280 reiserfs_xattr_set_handle+0xfd/0xdc0 reiserfs_xattr_set+0x428/0x550 __vfs_setxattr+0x460/0x4a0 __vfs_setxattr_noperm+0x12e/0x5e0 vfs_setxattr+0x221/0x420 ovl_check_setxattr+0x14d/0x2c0 ovl_copy_up_metadata+0x57a/0xb80 ovl_copy_up_flags+0x2c30/0x3a90 ovl_nlink_start+0x27c/0x4c0 ovl_do_remove+0x24b/0xbc0 vfs_unlink+0x35d/0x5f0 do_unlinkat+0x448/0x8c0 __x64_sys_unlink+0x49/0x50 do_syscall_64+0x41/0xc0 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&sb->s_type->i_mutex_key#35){+.+.}-{3:3} : validate_chain+0x166b/0x5860 __lock_acquire+0x125b/0x1f80 lock_acquire+0x20b/0x600 down_write+0x3a/0x60 lock_two_nondirectories+0xe2/0x140 vfs_rename+0x836/0x1190 do_renameat2+0xa70/0x1250 __x64_sys_renameat2+0xd2/0xe0 do_syscall_64+0x41/0xc0 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#35 --> &type->i_mutex_dir_key#23/3 --> &type->i_mutex_dir_key#23/2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->i_mutex_dir_key#23/2); lock(&type->i_mutex_dir_key#23/3); lock(&type->i_mutex_dir_key#23/2); lock(&sb->s_type->i_mutex_key#35); *** DEADLOCK *** 4 locks held by syz-executor.4/10741: #0: ffff88804419a460 (sb_writers#28){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 #1: ffff88804419a748 (&type->s_vfs_rename_key#7){+.+.}-{3:3}, at: lock_rename+0x58/0x1a0 #2: ffff88802c278980 (&type->i_mutex_dir_key#23/1){+.+.}-{3:3}, at: lock_rename+0xa4/0x1a0 #3: ffff88802c27b140 (&type->i_mutex_dir_key#23/2){+.+.}-{3:3}, at: lock_rename+0x172/0x1a0 stack backtrace: CPU: 1 PID: 10741 Comm: syz-executor.4 Not tainted 6.2.0-rc7-syzkaller-00018-g0983f6bf2bfc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: dump_stack_lvl+0x1b5/0x2a0 check_noncircular+0x2d1/0x390 validate_chain+0x166b/0x5860 __lock_acquire+0x125b/0x1f80 lock_acquire+0x20b/0x600 down_write+0x3a/0x60 lock_two_nondirectories+0xe2/0x140 vfs_rename+0x836/0x1190 do_renameat2+0xa70/0x1250 __x64_sys_renameat2+0xd2/0xe0 do_syscall_64+0x41/0xc0 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff05a28c0f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff05b022168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007ff05a3ac050 RCX: 00007ff05a28c0f9 RDX: 0000000000000007 RSI: 00000000200001c0 RDI: 0000000000000007 RBP: 00007ff05a2e7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff124527ef R14: 00007ff05b022300 R15: 0000000000022000