====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4188 is trying to acquire lock: ffff888071cc1228 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 but task is already holding lock: ffff8880746c8c70 (&ei->i_data_sem/2){++++}-{3:3}, at: ext4_truncate+0x994/0x1190 fs/ext4/inode.c:4258 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&ei->i_data_sem/2){++++}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 ext4_map_blocks+0x350/0x1a50 fs/ext4/inode.c:600 ext4_getblk+0x176/0x670 fs/ext4/inode.c:872 ext4_bread+0x26/0x180 fs/ext4/inode.c:925 ext4_quota_read+0x1ac/0x390 fs/ext4/super.c:6577 read_blk fs/quota/quota_tree.c:55 [inline] find_tree_dqentry+0x187/0xb30 fs/quota/quota_tree.c:617 find_dqentry fs/quota/quota_tree.c:647 [inline] qtree_read_dquot+0x122/0x690 fs/quota/quota_tree.c:667 v2_read_dquot+0xc0/0x110 fs/quota/quota_v2.c:333 dquot_acquire+0x152/0x520 fs/quota/dquot.c:488 ext4_acquire_dquot+0x2e3/0x4a0 fs/ext4/super.c:6232 dqget+0x713/0xbb0 fs/quota/dquot.c:1010 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1539 ext4_xattr_set+0xc5/0x310 fs/ext4/xattr.c:2494 __vfs_setxattr+0x3d8/0x410 fs/xattr.c:182 __vfs_setxattr_noperm+0x126/0x5e0 fs/xattr.c:216 vfs_setxattr+0x167/0x2e0 fs/xattr.c:303 do_setxattr fs/xattr.c:588 [inline] setxattr+0x2cb/0x360 fs/xattr.c:611 path_setxattr+0x147/0x290 fs/xattr.c:630 __do_sys_lsetxattr fs/xattr.c:653 [inline] __se_sys_lsetxattr fs/xattr.c:649 [inline] __x64_sys_lsetxattr+0xb4/0xd0 fs/xattr.c:649 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 -> #1 (&s->s_dquot.dqio_sem){++++}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 v2_read_dquot+0x4a/0x110 fs/quota/quota_v2.c:332 dquot_acquire+0x152/0x520 fs/quota/dquot.c:488 ext4_acquire_dquot+0x2e3/0x4a0 fs/ext4/super.c:6232 dqget+0x713/0xbb0 fs/quota/dquot.c:1010 dquot_set_dqblk+0x27/0xfb0 fs/quota/dquot.c:2848 quota_setquota+0x4d6/0x590 fs/quota/quota.c:309 __do_sys_quotactl fs/quota/quota.c:959 [inline] __se_sys_quotactl+0x28b/0x6f0 fs/quota/quota.c:915 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 (&dquot->dq_lock){+.+.}-{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+0x2c66/0x7b50 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 ext4_write_dquot+0x1f0/0x360 fs/ext4/super.c:6212 mark_dquot_dirty fs/quota/dquot.c:397 [inline] mark_all_dquot_dirty+0xf9/0x400 fs/quota/dquot.c:437 __dquot_free_space+0x7c3/0xb80 fs/quota/dquot.c:1964 dquot_free_space_nodirty include/linux/quotaops.h:369 [inline] dquot_free_space include/linux/quotaops.h:374 [inline] dquot_free_block include/linux/quotaops.h:385 [inline] ext4_mb_clear_bb fs/ext4/mballoc.c:6164 [inline] ext4_free_blocks+0x1b1b/0x24c0 fs/ext4/mballoc.c:6294 ext4_remove_blocks fs/ext4/extents.c:2522 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2706 [inline] ext4_ext_remove_space+0x22bd/0x41a0 fs/ext4/extents.c:2954 ext4_ext_truncate+0x182/0x230 fs/ext4/extents.c:4504 ext4_truncate+0xa41/0x1190 fs/ext4/inode.c:4263 ext4_evict_inode+0xb0f/0x1050 fs/ext4/inode.c:291 evict+0x4b6/0x8b0 fs/inode.c:647 do_unlinkat+0x3e7/0x710 fs/namei.c:4363 __do_sys_unlink fs/namei.c:4404 [inline] __se_sys_unlink fs/namei.c:4402 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4402 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: Chain exists of: &dquot->dq_lock --> &s->s_dquot.dqio_sem --> &ei->i_data_sem/2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem/2); lock(&s->s_dquot.dqio_sem); lock(&ei->i_data_sem/2); lock(&dquot->dq_lock); *** DEADLOCK *** 4 locks held by syz-executor/4188: #0: ffff88807d264460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386 #1: ffff88807d264650 (sb_internal){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1811 [inline] #1: ffff88807d264650 (sb_internal){.+.+}-{0:0}, at: sb_start_intwrite include/linux/fs.h:1928 [inline] #1: ffff88807d264650 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x41f/0x1050 fs/ext4/inode.c:245 #2: ffff8880746c8c70 (&ei->i_data_sem/2){++++}-{3:3}, at: ext4_truncate+0x994/0x1190 fs/ext4/inode.c:4258 #3: ffffffff8c441798 (dquot_srcu){....}-{0:0}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 1 PID: 4188 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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+0x2c66/0x7b50 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 ext4_write_dquot+0x1f0/0x360 fs/ext4/super.c:6212 mark_dquot_dirty fs/quota/dquot.c:397 [inline] mark_all_dquot_dirty+0xf9/0x400 fs/quota/dquot.c:437 __dquot_free_space+0x7c3/0xb80 fs/quota/dquot.c:1964 dquot_free_space_nodirty include/linux/quotaops.h:369 [inline] dquot_free_space include/linux/quotaops.h:374 [inline] dquot_free_block include/linux/quotaops.h:385 [inline] ext4_mb_clear_bb fs/ext4/mballoc.c:6164 [inline] ext4_free_blocks+0x1b1b/0x24c0 fs/ext4/mballoc.c:6294 ext4_remove_blocks fs/ext4/extents.c:2522 [inline] ext4_ext_rm_leaf fs/ext4/extents.c:2706 [inline] ext4_ext_remove_space+0x22bd/0x41a0 fs/ext4/extents.c:2954 ext4_ext_truncate+0x182/0x230 fs/ext4/extents.c:4504 ext4_truncate+0xa41/0x1190 fs/ext4/inode.c:4263 ext4_evict_inode+0xb0f/0x1050 fs/ext4/inode.c:291 evict+0x4b6/0x8b0 fs/inode.c:647 do_unlinkat+0x3e7/0x710 fs/namei.c:4363 __do_sys_unlink fs/namei.c:4404 [inline] __se_sys_unlink fs/namei.c:4402 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4402 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:0x7fa7a689af47 Code: 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 57 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffe123d6a58 EFLAGS: 00000206 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa7a689af47 RDX: 00007ffe123d6a80 RSI: 00007ffe123d6b10 RDI: 00007ffe123d6b10 RBP: 00007ffe123d6b10 R08: 00007ffe123d7b10 R09: 00000000ffffffff R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffe123d7c00 R13: 00007fa7a69312ca R14: 000000000006819e R15: 00007ffe123d8cd0