loop1: detected capacity change from 0 to 2048 EXT4-fs (loop1): mounted filesystem without journal. Quota mode: none. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.1.1160/8217 is trying to acquire lock: ffff888071fed108 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ffff888071fed108 (&ei->xattr_sem){++++}-{3:3}, at: ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1922 but task is already holding lock: ffff88805275ec18 (&sbi->s_writepages_rwsem){.+.+}-{0:0}, at: ext4_writepages+0x20f/0x2f40 fs/ext4/inode.c:2717 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sbi->s_writepages_rwsem){.+.+}-{0:0}: percpu_down_read+0x44/0x1a0 include/linux/percpu-rwsem.h:51 ext4_writepages+0x20f/0x2f40 fs/ext4/inode.c:2717 do_writepages+0x3ba/0x640 mm/page-writeback.c:2491 __writeback_single_inode+0x156/0x1160 fs/fs-writeback.c:1622 writeback_single_inode+0x3cb/0x8e0 fs/fs-writeback.c:1743 write_inode_now+0x17f/0x210 fs/fs-writeback.c:2786 iput_final fs/inode.c:1821 [inline] iput+0x613/0x980 fs/inode.c:1860 ext4_xattr_block_set+0x273b/0x32b0 fs/ext4/xattr.c:2148 ext4_xattr_move_to_block fs/ext4/xattr.c:2613 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2688 [inline] ext4_expand_extra_isize_ea+0x120b/0x1dc0 fs/ext4/xattr.c:2776 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:6003 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6046 [inline] __ext4_mark_inode_dirty+0x47f/0x770 fs/ext4/inode.c:6124 ext4_evict_inode+0xa7f/0x1110 fs/ext4/inode.c:281 evict+0x4c9/0x8d0 fs/inode.c:705 ext4_orphan_cleanup+0xbeb/0x1420 fs/ext4/orphan.c:472 __ext4_fill_super fs/ext4/super.c:5574 [inline] ext4_fill_super+0x6ee3/0x78c0 fs/ext4/super.c:5693 get_tree_bdev+0x3f1/0x610 fs/super.c:1366 vfs_get_tree+0x88/0x270 fs/super.c:1573 do_new_mount+0x24a/0xa40 fs/namespace.c:3078 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&ei->xattr_sem){++++}-{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+0x2d07/0x7d10 kernel/locking/lockdep.c:5049 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1922 ext4_writepages+0x670/0x2f40 fs/ext4/inode.c:2763 do_writepages+0x3ba/0x640 mm/page-writeback.c:2491 filemap_fdatawrite_wbc+0x11e/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] __filemap_fdatawrite mm/filemap.c:427 [inline] filemap_flush+0xe0/0x140 mm/filemap.c:454 ext4_convert_inline_data+0x18b/0x5f0 fs/ext4/inline.c:2097 ext4_fallocate+0xf6/0x2000 fs/ext4/extents.c:4776 vfs_fallocate+0x584/0x6f0 fs/open.c:323 ioctl_preallocate fs/ioctl.c:290 [inline] file_ioctl fs/ioctl.c:333 [inline] do_vfs_ioctl+0x1a32/0x1d40 fs/ioctl.c:849 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->s_writepages_rwsem); lock(&ei->xattr_sem); lock(&sbi->s_writepages_rwsem); lock(&ei->xattr_sem); *** DEADLOCK *** 3 locks held by syz.1.1160/8217: #0: ffff88807c9ee460 (sb_writers#4){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3015 [inline] #0: ffff88807c9ee460 (sb_writers#4){.+.+}-{0:0}, at: vfs_fallocate+0x4f1/0x6f0 fs/open.c:322 #1: ffff888071fed440 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff888071fed440 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_fallocate+0xee/0x2000 fs/ext4/extents.c:4775 #2: ffff88805275ec18 (&sbi->s_writepages_rwsem){.+.+}-{0:0}, at: ext4_writepages+0x20f/0x2f40 fs/ext4/inode.c:2717 stack backtrace: CPU: 0 PID: 8217 Comm: syz.1.1160 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x296/0x330 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+0x2d07/0x7d10 kernel/locking/lockdep.c:5049 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1922 ext4_writepages+0x670/0x2f40 fs/ext4/inode.c:2763 do_writepages+0x3ba/0x640 mm/page-writeback.c:2491 filemap_fdatawrite_wbc+0x11e/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] __filemap_fdatawrite mm/filemap.c:427 [inline] filemap_flush+0xe0/0x140 mm/filemap.c:454 ext4_convert_inline_data+0x18b/0x5f0 fs/ext4/inline.c:2097 ext4_fallocate+0xf6/0x2000 fs/ext4/extents.c:4776 vfs_fallocate+0x584/0x6f0 fs/open.c:323 ioctl_preallocate fs/ioctl.c:290 [inline] file_ioctl fs/ioctl.c:333 [inline] do_vfs_ioctl+0x1a32/0x1d40 fs/ioctl.c:849 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x83/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f564a99ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f564b7d0028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f564ac15fa0 RCX: 00007f564a99ce59 RDX: 00002000000000c0 RSI: 0000000040305829 RDI: 0000000000000005 RBP: 00007f564aa32d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f564ac16038 R14: 00007f564ac15fa0 R15: 00007fff7d2fccb8 EXT4-fs error (device loop1): ext4_mb_generate_buddy:1126: group 0, block bitmap and bg descriptor inconsistent: 25 vs 281 free clusters EXT4-fs (loop1): Delayed block allocation failed for inode 15 at logical offset 0 with max blocks 34 with error 28 EXT4-fs (loop1): This should not happen!! Data will be lost EXT4-fs (loop1): Total free blocks count 0 EXT4-fs (loop1): Free/Dirty block details EXT4-fs (loop1): free_blocks=4096 EXT4-fs (loop1): dirty_blocks=48 EXT4-fs (loop1): Block reservation details EXT4-fs (loop1): i_reserved_data_blocks=3