EXT4-fs (loop6): re-mounted. Opts: . Quota mode: none. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.6.1481/9988 is trying to acquire lock: ffff88805cb432a0 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ffff88805cb432a0 (&ei->xattr_sem){++++}-{3:3}, at: ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1900 but task is already holding lock: ffff888057c48bd8 (&sbi->s_writepages_rwsem){.+.+}-{0:0}, at: ext4_writepages+0x20f/0x2df0 fs/ext4/inode.c:2689 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+0x46/0x1b0 include/linux/percpu-rwsem.h:51 ext4_writepages+0x20f/0x2df0 fs/ext4/inode.c:2689 do_writepages+0x476/0x6e0 mm/page-writeback.c:2386 __writeback_single_inode+0x153/0xda0 fs/fs-writeback.c:1657 writeback_single_inode+0x3cb/0x8e0 fs/fs-writeback.c:1770 write_inode_now+0x23b/0x2c0 fs/fs-writeback.c:2817 iput_final fs/inode.c:1756 [inline] iput+0x5ab/0x8a0 fs/inode.c:1795 ext4_xattr_set_entry+0x34f4/0x3ea0 fs/ext4/xattr.c:1825 ext4_xattr_block_set+0x4fd/0x2d20 fs/ext4/xattr.c:1924 ext4_xattr_move_to_block fs/ext4/xattr.c:2618 [inline] ext4_xattr_make_inode_space fs/ext4/xattr.c:2693 [inline] ext4_expand_extra_isize_ea+0xf3f/0x19b0 fs/ext4/xattr.c:2781 __ext4_expand_extra_isize+0x301/0x3e0 fs/ext4/inode.c:5905 ext4_try_to_expand_extra_isize fs/ext4/inode.c:5948 [inline] __ext4_mark_inode_dirty+0x469/0x700 fs/ext4/inode.c:6026 ext4_evict_inode+0xa8d/0x1090 fs/ext4/inode.c:282 evict+0x4c9/0x8d0 fs/inode.c:647 ext4_orphan_cleanup+0xad2/0x1320 fs/ext4/orphan.c:472 ext4_fill_super+0x8e25/0x95a0 fs/ext4/super.c:5000 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 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 (&ei->xattr_sem){++++}-{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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1900 ext4_writepages+0x670/0x2df0 fs/ext4/inode.c:2735 do_writepages+0x476/0x6e0 mm/page-writeback.c:2386 filemap_fdatawrite_wbc+0x1eb/0x240 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] __filemap_fdatawrite mm/filemap.c:439 [inline] filemap_flush+0xd4/0x130 mm/filemap.c:466 ext4_rename fs/ext4/namei.c:3929 [inline] ext4_rename2+0x100c/0x30e0 fs/ext4/namei.c:4272 vfs_rename+0xbe1/0x1100 fs/namei.c:4840 do_renameat2+0x8b7/0xf60 fs/namei.c:4993 __do_sys_renameat2 fs/namei.c:5026 [inline] __se_sys_renameat2 fs/namei.c:5023 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5023 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(&sbi->s_writepages_rwsem); lock(&ei->xattr_sem); lock(&sbi->s_writepages_rwsem); lock(&ei->xattr_sem); *** DEADLOCK *** 5 locks held by syz.6.1481/9988: #0: ffff888057c4a460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386 #1: ffff88805c82c9b8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: lock_rename include/linux/fs.h:-1 [inline] #1: ffff88805c82c9b8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: do_renameat2+0x43d/0xf60 fs/namei.c:4932 #2: ffff88805c82abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #2: ffff88805c82abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: lock_two_nondirectories+0xd5/0x150 fs/inode.c:1147 #3: ffff88805cb435c8 (&sb->s_type->i_mutex_key#9/4){+.+.}-{3:3}, at: vfs_rename+0x7e3/0x1100 fs/namei.c:4811 #4: ffff888057c48bd8 (&sbi->s_writepages_rwsem){.+.+}-{0:0}, at: ext4_writepages+0x20f/0x2df0 fs/ext4/inode.c:2689 stack backtrace: CPU: 0 PID: 9988 Comm: syz.6.1481 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x296/0x330 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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ext4_write_lock_xattr fs/ext4/xattr.h:158 [inline] ext4_destroy_inline_data+0x24/0xe0 fs/ext4/inline.c:1900 ext4_writepages+0x670/0x2df0 fs/ext4/inode.c:2735 do_writepages+0x476/0x6e0 mm/page-writeback.c:2386 filemap_fdatawrite_wbc+0x1eb/0x240 mm/filemap.c:400 __filemap_fdatawrite_range mm/filemap.c:433 [inline] __filemap_fdatawrite mm/filemap.c:439 [inline] filemap_flush+0xd4/0x130 mm/filemap.c:466 ext4_rename fs/ext4/namei.c:3929 [inline] ext4_rename2+0x100c/0x30e0 fs/ext4/namei.c:4272 vfs_rename+0xbe1/0x1100 fs/namei.c:4840 do_renameat2+0x8b7/0xf60 fs/namei.c:4993 __do_sys_renameat2 fs/namei.c:5026 [inline] __se_sys_renameat2 fs/namei.c:5023 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5023 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:0x7fecb335b799 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:00007fecb1594028 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007fecb35d5090 RCX: 00007fecb335b799 RDX: ffffffffffffff9c RSI: 00002000000007c0 RDI: ffffffffffffff9c RBP: 00007fecb33f1bd9 R08: 0000000000000004 R09: 0000000000000000 R10: 00002000000005c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fecb35d5128 R14: 00007fecb35d5090 R15: 00007fffe2d426a8 EXT4-fs error (device loop6): ext4_mb_generate_buddy:1163: group 0, block bitmap and bg descriptor inconsistent: 25 vs 150994969 free clusters EXT4-fs (loop6): Delayed block allocation failed for inode 15 at logical offset 0 with max blocks 1088 with error 28 EXT4-fs (loop6): This should not happen!! Data will be lost EXT4-fs (loop6): Total free blocks count 0 EXT4-fs (loop6): Free/Dirty block details EXT4-fs (loop6): free_blocks=2415919104 EXT4-fs (loop6): dirty_blocks=1088 EXT4-fs (loop6): Block reservation details EXT4-fs (loop6): i_reserved_data_blocks=68