EXT4-fs: Ignoring removed orlov option EXT4-fs (loop8): stripe (2) is not aligned with cluster size (16), stripe is disabled EXT4-fs (loop8): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback. ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc5-next-20250710-syzkaller #0 Not tainted ------------------------------------------------------ syz.8.3215/15524 is trying to acquire lock: ffff88807b2bed10 (&sb->s_type->i_mutex_key#9/1){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] ffff88807b2bed10 (&sb->s_type->i_mutex_key#9/1){+.+.}-{4:4}, at: ext4_xattr_inode_create fs/ext4/xattr.c:1506 [inline] ffff88807b2bed10 (&sb->s_type->i_mutex_key#9/1){+.+.}-{4:4}, at: ext4_xattr_inode_lookup_create+0x17d4/0x1c20 fs/ext4/xattr.c:1588 but task is already holding lock: ffff88807b2be210 (&ei->i_data_sem/3){++++}-{4:4}, at: ext4_truncate+0x93a/0x1100 fs/ext4/inode.c:4569 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ei->i_data_sem/3){++++}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1592 ext4_update_i_disksize fs/ext4/ext4.h:3449 [inline] ext4_xattr_inode_write fs/ext4/xattr.c:1444 [inline] ext4_xattr_inode_lookup_create+0x14d1/0x1c20 fs/ext4/xattr.c:1594 ext4_xattr_ibody_set+0x202/0x6a0 fs/ext4/xattr.c:2258 ext4_xattr_set_handle+0xf70/0x1590 fs/ext4/xattr.c:2435 ext4_xattr_set+0x230/0x320 fs/ext4/xattr.c:2549 __vfs_setxattr+0x439/0x480 fs/xattr.c:200 __vfs_setxattr_noperm+0x12d/0x660 fs/xattr.c:234 vfs_setxattr+0x16b/0x2f0 fs/xattr.c:321 do_setxattr fs/xattr.c:636 [inline] file_setxattr+0x1da/0x2b0 fs/xattr.c:646 path_setxattrat+0x327/0x3a0 fs/xattr.c:711 __do_sys_fsetxattr fs/xattr.c:761 [inline] __se_sys_fsetxattr fs/xattr.c:758 [inline] __x64_sys_fsetxattr+0xbc/0xe0 fs/xattr.c:758 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&sb->s_type->i_mutex_key#9/1){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1592 inode_lock include/linux/fs.h:869 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1506 [inline] ext4_xattr_inode_lookup_create+0x17d4/0x1c20 fs/ext4/xattr.c:1588 ext4_xattr_block_set+0x223/0x2ac0 fs/ext4/xattr.c:1908 ext4_xattr_move_to_block fs/ext4/xattr.c:2659 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2734 [inline] ext4_expand_extra_isize_ea+0x12d5/0x1ea0 fs/ext4/xattr.c:2822 __ext4_expand_extra_isize+0x30d/0x400 fs/ext4/inode.c:6305 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6348 [inline] __ext4_mark_inode_dirty+0x46c/0x700 fs/ext4/inode.c:6426 ext4_ext_truncate+0xac/0x300 fs/ext4/extents.c:4475 ext4_truncate+0x9bb/0x1100 fs/ext4/inode.c:4573 ext4_setattr+0x1015/0x1bc0 fs/ext4/inode.c:5958 notify_change+0xb36/0xe40 fs/attr.c:552 do_truncate+0x1a4/0x220 fs/open.c:68 vfs_truncate+0x493/0x520 fs/open.c:118 do_sys_truncate+0xdb/0x190 fs/open.c:141 __do_sys_truncate fs/open.c:153 [inline] __se_sys_truncate fs/open.c:151 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:151 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem/3); lock(&sb->s_type->i_mutex_key#9/1); lock(&ei->i_data_sem/3); lock(&sb->s_type->i_mutex_key#9/1); *** DEADLOCK *** 5 locks held by syz.8.3215/15524: #0: ffff888028690428 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:557 #1: ffff88807b2be380 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: inode_lock_killable include/linux/fs.h:874 [inline] #1: ffff88807b2be380 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: do_truncate+0x171/0x220 fs/open.c:63 #2: ffff88807b2be520 (mapping.invalidate_lock#2){++++}-{4:4}, at: filemap_invalidate_lock include/linux/fs.h:924 [inline] #2: ffff88807b2be520 (mapping.invalidate_lock#2){++++}-{4:4}, at: ext4_setattr+0xe9d/0x1bc0 fs/ext4/inode.c:5868 #3: ffff88807b2be210 (&ei->i_data_sem/3){++++}-{4:4}, at: ext4_truncate+0x93a/0x1100 fs/ext4/inode.c:4569 #4: ffff88807b2be068 (&ei->xattr_sem){++++}-{4:4}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:164 [inline] #4: ffff88807b2be068 (&ei->xattr_sem){++++}-{4:4}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:6345 [inline] #4: ffff88807b2be068 (&ei->xattr_sem){++++}-{4:4}, at: __ext4_mark_inode_dirty+0x3eb/0x700 fs/ext4/inode.c:6426 stack backtrace: CPU: 0 UID: 0 PID: 15524 Comm: syz.8.3215 Not tainted 6.16.0-rc5-next-20250710-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write+0x96/0x1f0 kernel/locking/rwsem.c:1592 inode_lock include/linux/fs.h:869 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1506 [inline] ext4_xattr_inode_lookup_create+0x17d4/0x1c20 fs/ext4/xattr.c:1588 ext4_xattr_block_set+0x223/0x2ac0 fs/ext4/xattr.c:1908 ext4_xattr_move_to_block fs/ext4/xattr.c:2659 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2734 [inline] ext4_expand_extra_isize_ea+0x12d5/0x1ea0 fs/ext4/xattr.c:2822 __ext4_expand_extra_isize+0x30d/0x400 fs/ext4/inode.c:6305 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6348 [inline] __ext4_mark_inode_dirty+0x46c/0x700 fs/ext4/inode.c:6426 ext4_ext_truncate+0xac/0x300 fs/ext4/extents.c:4475 ext4_truncate+0x9bb/0x1100 fs/ext4/inode.c:4573 ext4_setattr+0x1015/0x1bc0 fs/ext4/inode.c:5958 notify_change+0xb36/0xe40 fs/attr.c:552 do_truncate+0x1a4/0x220 fs/open.c:68 vfs_truncate+0x493/0x520 fs/open.c:118 do_sys_truncate+0xdb/0x190 fs/open.c:141 __do_sys_truncate fs/open.c:153 [inline] __se_sys_truncate fs/open.c:151 [inline] __x64_sys_truncate+0x5b/0x70 fs/open.c:151 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f8518e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1f86080038 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007f1f853b5fa0 RCX: 00007f1f8518e929 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000200000000100 RBP: 00007f1f85210b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f853b5fa0 R15: 00007ffdc9030a58