loop7: detected capacity change from 0 to 512 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.7.3897/19122 is trying to acquire lock: ffff888057598b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: do_writepages+0x27a/0x600 mm/page-writeback.c:2604 but task is already holding lock: ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:164 [inline] ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:6404 [inline] ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: __ext4_mark_inode_dirty+0x4ba/0x870 fs/ext4/inode.c:6485 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ei->xattr_sem){++++}-{4:4}: down_read+0x9b/0x480 kernel/locking/rwsem.c:1537 ext4_xattr_get+0x14d/0x780 fs/ext4/xattr.c:708 ext4_get_acl+0x7d/0x670 fs/ext4/acl.c:165 __get_acl+0x379/0x4d0 fs/posix_acl.c:159 get_inode_acl fs/posix_acl.c:184 [inline] posix_acl_create+0x14c/0x520 fs/posix_acl.c:646 ext4_init_acl+0x9a/0x300 fs/ext4/acl.c:284 __ext4_new_inode+0x3ffc/0x4f00 fs/ext4/ialloc.c:1321 ext4_ext_migrate+0x6fa/0x1ee0 fs/ext4/migrate.c:456 __ext4_ioctl+0x3178/0x4410 fs/ext4/ioctl.c:1694 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&sbi->s_writepages_rwsem){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x126f/0x1c90 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5825 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read include/linux/percpu-rwsem.h:77 [inline] ext4_writepages_down_read fs/ext4/ext4.h:1796 [inline] ext4_writepages+0x224/0x7d0 fs/ext4/inode.c:3024 do_writepages+0x27a/0x600 mm/page-writeback.c:2604 __writeback_single_inode+0x160/0xfb0 fs/fs-writeback.c:1719 writeback_single_inode+0x2bc/0x550 fs/fs-writeback.c:1840 write_inode_now+0x170/0x1e0 fs/fs-writeback.c:2903 iput_final fs/inode.c:1901 [inline] iput.part.0+0x487/0xb00 fs/inode.c:1966 iput+0x35/0x40 fs/inode.c:1929 ext4_xattr_block_set+0x67c/0x3650 fs/ext4/xattr.c:2199 ext4_xattr_move_to_block fs/ext4/xattr.c:2664 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2739 [inline] ext4_expand_extra_isize_ea+0x1442/0x1ab0 fs/ext4/xattr.c:2827 __ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6364 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6407 [inline] __ext4_mark_inode_dirty+0x544/0x870 fs/ext4/inode.c:6485 ext4_evict_inode+0x74e/0x18e0 fs/ext4/inode.c:254 evict+0x3e6/0x920 fs/inode.c:810 iput_final fs/inode.c:1914 [inline] iput.part.0+0x6a9/0xb00 fs/inode.c:1966 iput+0x35/0x40 fs/inode.c:1929 ext4_orphan_cleanup+0x731/0x11e0 fs/ext4/orphan.c:470 __ext4_fill_super fs/ext4/super.c:5617 [inline] ext4_fill_super+0x8db7/0xaf70 fs/ext4/super.c:5736 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1691 vfs_get_tree+0x8e/0x340 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount fs/namespace.c:3727 [inline] path_mount+0x7b9/0x23a0 fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 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->xattr_sem); lock(&sbi->s_writepages_rwsem); lock(&ei->xattr_sem); rlock(&sbi->s_writepages_rwsem); *** DEADLOCK *** 3 locks held by syz.7.3897/19122: #0: ffff8880779300e0 (&type->s_umount_key#28/1){+.+.}-{4:4}, at: alloc_super+0x1e3/0xb60 fs/super.c:344 #1: ffff888077930610 (sb_internal){++++}-{0:0}, at: evict+0x3e6/0x920 fs/inode.c:810 #2: ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: ext4_write_trylock_xattr fs/ext4/xattr.h:164 [inline] #2: ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: ext4_try_to_expand_extra_isize fs/ext4/inode.c:6404 [inline] #2: ffff888073ff3a28 (&ei->xattr_sem){++++}-{4:4}, at: __ext4_mark_inode_dirty+0x4ba/0x870 fs/ext4/inode.c:6485 stack backtrace: CPU: 1 UID: 0 PID: 19122 Comm: syz.7.3897 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x275/0x350 kernel/locking/lockdep.c:2043 check_noncircular+0x14c/0x170 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x126f/0x1c90 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5825 percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline] percpu_down_read include/linux/percpu-rwsem.h:77 [inline] ext4_writepages_down_read fs/ext4/ext4.h:1796 [inline] ext4_writepages+0x224/0x7d0 fs/ext4/inode.c:3024 do_writepages+0x27a/0x600 mm/page-writeback.c:2604 __writeback_single_inode+0x160/0xfb0 fs/fs-writeback.c:1719 writeback_single_inode+0x2bc/0x550 fs/fs-writeback.c:1840 write_inode_now+0x170/0x1e0 fs/fs-writeback.c:2903 iput_final fs/inode.c:1901 [inline] iput.part.0+0x487/0xb00 fs/inode.c:1966 iput+0x35/0x40 fs/inode.c:1929 ext4_xattr_block_set+0x67c/0x3650 fs/ext4/xattr.c:2199 ext4_xattr_move_to_block fs/ext4/xattr.c:2664 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2739 [inline] ext4_expand_extra_isize_ea+0x1442/0x1ab0 fs/ext4/xattr.c:2827 __ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6364 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6407 [inline] __ext4_mark_inode_dirty+0x544/0x870 fs/ext4/inode.c:6485 ext4_evict_inode+0x74e/0x18e0 fs/ext4/inode.c:254 evict+0x3e6/0x920 fs/inode.c:810 iput_final fs/inode.c:1914 [inline] iput.part.0+0x6a9/0xb00 fs/inode.c:1966 iput+0x35/0x40 fs/inode.c:1929 ext4_orphan_cleanup+0x731/0x11e0 fs/ext4/orphan.c:470 __ext4_fill_super fs/ext4/super.c:5617 [inline] ext4_fill_super+0x8db7/0xaf70 fs/ext4/super.c:5736 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1691 vfs_get_tree+0x8e/0x340 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount fs/namespace.c:3727 [inline] path_mount+0x7b9/0x23a0 fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7671b9076a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f7672a22e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f7672a22ef0 RCX: 00007f7671b9076a RDX: 0000200000000180 RSI: 00002000000001c0 RDI: 00007f7672a22eb0 RBP: 0000200000000180 R08: 00007f7672a22ef0 R09: 0000000000800700 R10: 0000000000800700 R11: 0000000000000246 R12: 00002000000001c0 R13: 00007f7672a22eb0 R14: 000000000000046f R15: 000000000000002c ------------[ cut here ]------------ EA inode 11 i_nlink=2 WARNING: CPU: 0 PID: 19122 at fs/ext4/xattr.c:1056 ext4_xattr_inode_update_ref+0x4ec/0x610 fs/ext4/xattr.c:1056 Modules linked in: CPU: 0 UID: 0 PID: 19122 Comm: syz.7.3897 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 RIP: 0010:ext4_xattr_inode_update_ref+0x4ec/0x610 fs/ext4/xattr.c:1056 Code: df 48 8d 7b 40 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 23 01 00 00 48 8b 73 40 44 89 e2 48 c7 c7 40 5d a8 8b e8 35 ef ec fe 90 <0f> 0b 90 90 e9 d9 fe ff ff e8 16 bd 2e ff 44 0f b6 2d 75 74 dc 0d RSP: 0018:ffffc90002e87178 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888054014f18 RCX: ffffc90018dc9000 RDX: 0000000000080000 RSI: ffffffff817b2ef5 RDI: 0000000000000001 RBP: ffffc90002e87240 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 000000002d2d2d2d R12: 0000000000000002 R13: 0000000000000000 R14: 1ffff920005d0e32 R15: ffff888054015108 FS: 00007f7672a236c0(0000) GS:ffff888124a09000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2d9dbd CR3: 000000004c63f000 CR4: 0000000000350ef0 Call Trace: ext4_xattr_inode_dec_ref fs/ext4/xattr.c:1081 [inline] ext4_xattr_set_entry+0x158f/0x1f00 fs/ext4/xattr.c:1719 ext4_xattr_ibody_set+0x3d6/0x5d0 fs/ext4/xattr.c:2268 ext4_xattr_move_to_block fs/ext4/xattr.c:2671 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2739 [inline] ext4_expand_extra_isize_ea+0x148c/0x1ab0 fs/ext4/xattr.c:2827 __ext4_expand_extra_isize+0x346/0x480 fs/ext4/inode.c:6364 ext4_try_to_expand_extra_isize fs/ext4/inode.c:6407 [inline] __ext4_mark_inode_dirty+0x544/0x870 fs/ext4/inode.c:6485 ext4_evict_inode+0x74e/0x18e0 fs/ext4/inode.c:254 evict+0x3e6/0x920 fs/inode.c:810 iput_final fs/inode.c:1914 [inline] iput.part.0+0x6a9/0xb00 fs/inode.c:1966 iput+0x35/0x40 fs/inode.c:1929 ext4_orphan_cleanup+0x731/0x11e0 fs/ext4/orphan.c:470 __ext4_fill_super fs/ext4/super.c:5617 [inline] ext4_fill_super+0x8db7/0xaf70 fs/ext4/super.c:5736 get_tree_bdev_flags+0x38c/0x620 fs/super.c:1691 vfs_get_tree+0x8e/0x340 fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount fs/namespace.c:3727 [inline] path_mount+0x7b9/0x23a0 fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __x64_sys_mount+0x293/0x310 fs/namespace.c:4215 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7671b9076a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f7672a22e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f7672a22ef0 RCX: 00007f7671b9076a RDX: 0000200000000180 RSI: 00002000000001c0 RDI: 00007f7672a22eb0 RBP: 0000200000000180 R08: 00007f7672a22ef0 R09: 0000000000800700 R10: 0000000000800700 R11: 0000000000000246 R12: 00002000000001c0 R13: 00007f7672a22eb0 R14: 000000000000046f R15: 000000000000002c