loop0: detected capacity change from 0 to 1024 EXT4-fs: Ignoring removed orlov option EXT4-fs: Ignoring removed nomblk_io_submit option ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc7-syzkaller-gef445d1539dd #0 Not tainted ------------------------------------------------------ syz-executor250/6533 is trying to acquire lock: ffff0000df9cac00 (&ea_inode->i_rwsem#8/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] ffff0000df9cac00 (&ea_inode->i_rwsem#8/1){+.+.}-{3:3}, at: ext4_xattr_inode_iget+0x344/0x4dc fs/ext4/xattr.c:461 but task is already holding lock: ffff0000df9cf088 (&ei->i_data_sem/3){++++}-{3:3}, at: ext4_truncate+0x7d0/0x1060 fs/ext4/inode.c:4134 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ei->i_data_sem/3){++++}-{3:3}: down_write+0x50/0xc0 kernel/locking/rwsem.c:1579 ext4_update_i_disksize fs/ext4/ext4.h:3386 [inline] ext4_xattr_inode_write fs/ext4/xattr.c:1446 [inline] ext4_xattr_inode_lookup_create+0x1200/0x1918 fs/ext4/xattr.c:1596 ext4_xattr_ibody_set+0x1b0/0x604 fs/ext4/xattr.c:2263 ext4_xattr_set_handle+0xb64/0x12d0 fs/ext4/xattr.c:2440 ext4_xattr_set+0x1e0/0x354 fs/ext4/xattr.c:2554 ext4_xattr_trusted_set+0x4c/0x64 fs/ext4/xattr_trusted.c:38 __vfs_setxattr+0x3d8/0x400 fs/xattr.c:200 __vfs_setxattr_noperm+0x110/0x578 fs/xattr.c:234 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:295 vfs_setxattr+0x1a8/0x344 fs/xattr.c:321 do_setxattr fs/xattr.c:629 [inline] setxattr+0x208/0x29c fs/xattr.c:652 path_setxattr+0x17c/0x258 fs/xattr.c:671 __do_sys_setxattr fs/xattr.c:687 [inline] __se_sys_setxattr fs/xattr.c:683 [inline] __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:683 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 -> #0 (&ea_inode->i_rwsem#8/1){+.+.}-{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+0x3384/0x763c kernel/locking/lockdep.c:5137 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5754 down_write+0x50/0xc0 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] ext4_xattr_inode_iget+0x344/0x4dc fs/ext4/xattr.c:461 ext4_xattr_inode_get+0x12c/0x3a0 fs/ext4/xattr.c:535 ext4_xattr_move_to_block fs/ext4/xattr.c:2636 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2738 [inline] ext4_expand_extra_isize_ea+0xbc8/0x16c0 fs/ext4/xattr.c:2830 __ext4_expand_extra_isize+0x290/0x348 fs/ext4/inode.c:5782 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5825 [inline] __ext4_mark_inode_dirty+0x458/0x868 fs/ext4/inode.c:5903 ext4_ext_truncate+0x94/0x1d4 fs/ext4/extents.c:4432 ext4_truncate+0x9c8/0x1060 fs/ext4/inode.c:4139 ext4_evict_inode+0xaf0/0x10f0 fs/ext4/inode.c:258 evict+0x260/0x68c fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput+0x74c/0x830 fs/inode.c:1767 dentry_unlink_inode+0x394/0x4d4 fs/dcache.c:403 __dentry_kill+0x178/0x5e8 fs/dcache.c:606 dput+0x1b8/0x290 fs/dcache.c:848 do_renameat2+0x9d4/0xe40 fs/namei.c:5099 __do_sys_renameat2 fs/namei.c:5131 [inline] __se_sys_renameat2 fs/namei.c:5128 [inline] __arm64_sys_renameat2+0xe0/0xfc fs/namei.c:5128 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem/3); lock(&ea_inode->i_rwsem#8/1); lock(&ei->i_data_sem/3); lock(&ea_inode->i_rwsem#8/1); *** DEADLOCK *** 7 locks held by syz-executor250/6533: #0: ffff0000dbc2a420 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:409 #1: ffff0000dbc2a730 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: lock_rename fs/namei.c:3125 [inline] #1: ffff0000dbc2a730 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: do_renameat2+0x4a0/0xe40 fs/namei.c:5032 #2: ffff0000df93e800 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:826 [inline] #2: ffff0000df93e800 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: lock_two_directories+0x144/0x214 fs/namei.c:3091 #3: ffff0000df9ce800 (&type->i_mutex_dir_key#3/5){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:826 [inline] #3: ffff0000df9ce800 (&type->i_mutex_dir_key#3/5){+.+.}-{3:3}, at: lock_two_directories+0x16c/0x214 fs/namei.c:3092 #4: ffff0000dbc2a610 (sb_internal){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1655 [inline] #4: ffff0000dbc2a610 (sb_internal){.+.+}-{0:0}, at: sb_start_intwrite include/linux/fs.h:1838 [inline] #4: ffff0000dbc2a610 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x2c0/0x10f0 fs/ext4/inode.c:212 #5: ffff0000df9cf088 (&ei->i_data_sem/3){++++}-{3:3}, at: ext4_truncate+0x7d0/0x1060 fs/ext4/inode.c:4134 #6: ffff0000df9ceec8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:162 [inline] #6: ffff0000df9ceec8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:5822 [inline] #6: ffff0000df9ceec8 (&ei->xattr_sem){++++}-{3:3}, at: __ext4_mark_inode_dirty+0x3d8/0x868 fs/ext4/inode.c:5903 stack backtrace: CPU: 1 PID: 6533 Comm: syz-executor250 Not tainted 6.10.0-rc7-syzkaller-gef445d1539dd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2060 check_noncircular+0x310/0x404 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+0x3384/0x763c kernel/locking/lockdep.c:5137 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5754 down_write+0x50/0xc0 kernel/locking/rwsem.c:1579 inode_lock include/linux/fs.h:791 [inline] ext4_xattr_inode_iget+0x344/0x4dc fs/ext4/xattr.c:461 ext4_xattr_inode_get+0x12c/0x3a0 fs/ext4/xattr.c:535 ext4_xattr_move_to_block fs/ext4/xattr.c:2636 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2738 [inline] ext4_expand_extra_isize_ea+0xbc8/0x16c0 fs/ext4/xattr.c:2830 __ext4_expand_extra_isize+0x290/0x348 fs/ext4/inode.c:5782 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5825 [inline] __ext4_mark_inode_dirty+0x458/0x868 fs/ext4/inode.c:5903 ext4_ext_truncate+0x94/0x1d4 fs/ext4/extents.c:4432 ext4_truncate+0x9c8/0x1060 fs/ext4/inode.c:4139 ext4_evict_inode+0xaf0/0x10f0 fs/ext4/inode.c:258 evict+0x260/0x68c fs/inode.c:667 iput_final fs/inode.c:1741 [inline] iput+0x74c/0x830 fs/inode.c:1767 dentry_unlink_inode+0x394/0x4d4 fs/dcache.c:403 __dentry_kill+0x178/0x5e8 fs/dcache.c:606 dput+0x1b8/0x290 fs/dcache.c:848 do_renameat2+0x9d4/0xe40 fs/namei.c:5099 __do_sys_renameat2 fs/namei.c:5131 [inline] __se_sys_renameat2 fs/namei.c:5128 [inline] __arm64_sys_renameat2+0xe0/0xfc fs/namei.c:5128 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:48 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:131 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:150 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598