EXT4-fs (loop1): mounted filesystem without journal. Opts: i_version,nombcache,debug_want_extra_isize=0x0000000000000068,lazytime,block_validity,sysvgroups,,errors=continue. Quota mode: none. ====================================================== WARNING: possible circular locking dependency detected 5.15.189-syzkaller #0 Not tainted ------------------------------------------------------ syz.1.757/7090 is trying to acquire lock: ffff888060d003f0 (&sb->s_type->i_mutex_key#9/1){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff888060d003f0 (&sb->s_type->i_mutex_key#9/1){+.+.}-{3:3}, at: ext4_xattr_inode_create fs/ext4/xattr.c:1474 [inline] ffff888060d003f0 (&sb->s_type->i_mutex_key#9/1){+.+.}-{3:3}, at: ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1556 [inline] ffff888060d003f0 (&sb->s_type->i_mutex_key#9/1){+.+.}-{3:3}, at: ext4_xattr_set_entry+0x34fb/0x3d30 fs/ext4/xattr.c:1684 but task is already holding lock: ffff888060d07020 (&ei->i_data_sem/3){++++}-{3:3}, at: ext4_map_blocks+0x8b2/0x1b30 fs/ext4/inode.c:666 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+0x38/0x60 kernel/locking/rwsem.c:1551 ext4_update_i_disksize fs/ext4/ext4.h:3409 [inline] ext4_xattr_inode_write fs/ext4/xattr.c:1412 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1560 [inline] ext4_xattr_set_entry+0x32c3/0x3d30 fs/ext4/xattr.c:1684 ext4_xattr_ibody_set+0x112/0x330 fs/ext4/xattr.c:2252 ext4_xattr_set_handle+0xa7c/0x12b0 fs/ext4/xattr.c:2409 ext4_xattr_set+0x22a/0x320 fs/ext4/xattr.c:2522 __vfs_setxattr+0x3e0/0x420 fs/xattr.c:182 __vfs_setxattr_noperm+0x129/0x5e0 fs/xattr.c:216 vfs_setxattr+0x168/0x2f0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2da/0x300 fs/xattr.c:611 __do_sys_fsetxattr fs/xattr.c:667 [inline] __se_sys_fsetxattr+0x15e/0x1d0 fs/xattr.c:656 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 ( &sb->s_type->i_mutex_key#9/1){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1474 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1556 [inline] ext4_xattr_set_entry+0x34fb/0x3d30 fs/ext4/xattr.c:1684 ext4_xattr_block_set+0x4f7/0x2d30 fs/ext4/xattr.c:1935 ext4_xattr_move_to_block fs/ext4/xattr.c:2632 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2707 [inline] ext4_expand_extra_isize_ea+0xf4b/0x19a0 fs/ext4/xattr.c:2799 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5887 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5930 [inline] __ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6008 ext4_dirty_inode+0xbf/0x100 fs/ext4/inode.c:6040 __mark_inode_dirty+0x2b0/0xc60 fs/fs-writeback.c:2464 mark_inode_dirty include/linux/fs.h:2467 [inline] dquot_alloc_space include/linux/quotaops.h:317 [inline] dquot_alloc_block include/linux/quotaops.h:334 [inline] ext4_mb_new_blocks+0x2b8e/0x4940 fs/ext4/mballoc.c:5739 ext4_alloc_branch fs/ext4/indirect.c:340 [inline] ext4_ind_map_blocks+0xe1c/0x2110 fs/ext4/indirect.c:635 ext4_map_blocks+0x91f/0x1b30 fs/ext4/inode.c:675 _ext4_get_block+0x1d7/0x4e0 fs/ext4/inode.c:816 ext4_block_write_begin+0x60f/0x1210 fs/ext4/inode.c:1101 ext4_write_begin+0x6c2/0x15c0 fs/ext4/ext4_jbd2.h:-1 generic_perform_write+0x2aa/0x530 mm/filemap.c:3785 ext4_buffered_write_iter+0x25f/0x3b0 fs/ext4/file.c:268 ext4_file_write_iter+0x773/0x17b0 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x712/0xd00 fs/read_write.c:594 ksys_write+0x14d/0x250 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 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.1.757/7090: #0: ffff888079945270 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2bf/0x370 fs/file.c:1058 #1: ffff88805dfce460 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0x28a/0xd00 fs/read_write.c:590 #2: ffff888060d07198 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #2: ffff888060d07198 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_buffered_write_iter+0xa6/0x3b0 fs/ext4/file.c:262 #3: ffff888060d07020 (&ei->i_data_sem/3){++++}-{3:3}, at: ext4_map_blocks+0x8b2/0x1b30 fs/ext4/inode.c:666 #4: ffff888060d06e70 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:162 [inline] #4: ffff888060d06e70 (&ei->xattr_sem){++++}-{3:3}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:5927 [inline] #4: ffff888060d06e70 (&ei->xattr_sem){++++}-{3:3}, at: __ext4_mark_inode_dirty+0x3e8/0x700 fs/ext4/inode.c:6008 stack backtrace: CPU: 1 PID: 7090 Comm: syz.1.757 Not tainted 5.15.189-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] ext4_xattr_inode_create fs/ext4/xattr.c:1474 [inline] ext4_xattr_inode_lookup_create fs/ext4/xattr.c:1556 [inline] ext4_xattr_set_entry+0x34fb/0x3d30 fs/ext4/xattr.c:1684 ext4_xattr_block_set+0x4f7/0x2d30 fs/ext4/xattr.c:1935 ext4_xattr_move_to_block fs/ext4/xattr.c:2632 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2707 [inline] ext4_expand_extra_isize_ea+0xf4b/0x19a0 fs/ext4/xattr.c:2799 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5887 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5930 [inline] __ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6008 ext4_dirty_inode+0xbf/0x100 fs/ext4/inode.c:6040 __mark_inode_dirty+0x2b0/0xc60 fs/fs-writeback.c:2464 mark_inode_dirty include/linux/fs.h:2467 [inline] dquot_alloc_space include/linux/quotaops.h:317 [inline] dquot_alloc_block include/linux/quotaops.h:334 [inline] ext4_mb_new_blocks+0x2b8e/0x4940 fs/ext4/mballoc.c:5739 ext4_alloc_branch fs/ext4/indirect.c:340 [inline] ext4_ind_map_blocks+0xe1c/0x2110 fs/ext4/indirect.c:635 ext4_map_blocks+0x91f/0x1b30 fs/ext4/inode.c:675 _ext4_get_block+0x1d7/0x4e0 fs/ext4/inode.c:816 ext4_block_write_begin+0x60f/0x1210 fs/ext4/inode.c:1101 ext4_write_begin+0x6c2/0x15c0 fs/ext4/ext4_jbd2.h:-1 generic_perform_write+0x2aa/0x530 mm/filemap.c:3785 ext4_buffered_write_iter+0x25f/0x3b0 fs/ext4/file.c:268 ext4_file_write_iter+0x773/0x17b0 fs/ext4/file.c:-1 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x712/0xd00 fs/read_write.c:594 ksys_write+0x14d/0x250 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ffb44ed9be9 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:00007ffb43141038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ffb45100fa0 RCX: 00007ffb44ed9be9 RDX: 00000000fffffdab RSI: 0000200000000000 RDI: 0000000000000004 RBP: 00007ffb44f5ce19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffb45101038 R14: 00007ffb45100fa0 R15: 00007ffe568c9ed8