gfs2: fsid=syz:syz.0: found 1 quota changes ====================================================== WARNING: possible circular locking dependency detected 6.1.140-syzkaller #0 Not tainted ------------------------------------------------------ syz.0.1858/12083 is trying to acquire lock: ffff888055a48ae0 (&sdp->sd_quota_mutex){+.+.}-{3:3}, at: do_qc+0xca/0x730 fs/gfs2/quota.c:682 but task is already holding lock: ffff88805b634fd0 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1512 [inline] ffff88805b634fd0 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x241b/0x35c0 fs/gfs2/bmap.c:1837 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ip->i_rw_mutex){++++}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 __gfs2_iomap_get+0x155/0x13e0 fs/gfs2/bmap.c:856 gfs2_iomap_get+0xc1/0x120 fs/gfs2/bmap.c:1396 bh_get+0x241/0x730 fs/gfs2/quota.c:385 qdsb_get+0x21c/0x3c0 fs/gfs2/quota.c:522 gfs2_quota_hold+0x194/0x5d0 fs/gfs2/quota.c:608 punch_hole+0xd16/0x35c0 fs/gfs2/bmap.c:1798 evict_unlinked_inode+0x1a3/0x6d0 fs/gfs2/super.c:1398 gfs2_evict_inode+0x6a7/0x1170 fs/gfs2/super.c:1497 evict+0x485/0x870 fs/inode.c:705 __dentry_kill+0x431/0x650 fs/dcache.c:611 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfa/0x1d0 fs/dcache.c:918 __fput+0x5e0/0x920 fs/file_table.c:328 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&sdp->sd_quota_mutex){+.+.}-{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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x120/0xaf0 kernel/locking/mutex.c:747 do_qc+0xca/0x730 fs/gfs2/quota.c:682 gfs2_quota_change+0x2f5/0x8e0 fs/gfs2/quota.c:1295 punch_hole+0x304c/0x35c0 fs/gfs2/bmap.c:1938 evict_unlinked_inode+0x1a3/0x6d0 fs/gfs2/super.c:1398 gfs2_evict_inode+0x6a7/0x1170 fs/gfs2/super.c:1497 evict+0x485/0x870 fs/inode.c:705 __dentry_kill+0x431/0x650 fs/dcache.c:611 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfa/0x1d0 fs/dcache.c:918 __fput+0x5e0/0x920 fs/file_table.c:328 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ip->i_rw_mutex); lock(&sdp->sd_quota_mutex); lock(&ip->i_rw_mutex); lock(&sdp->sd_quota_mutex); *** DEADLOCK *** 3 locks held by syz.0.1858/12083: #0: ffff888053ccc650 (sb_internal#3){.+.+}-{0:0}, at: gfs2_trans_begin+0x6b/0xe0 fs/gfs2/trans.c:118 #1: ffff888055a49058 (&sdp->sd_log_flush_lock){.+.+}-{3:3}, at: __gfs2_trans_begin+0x50d/0x880 fs/gfs2/trans.c:87 #2: ffff88805b634fd0 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1512 [inline] #2: ffff88805b634fd0 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x241b/0x35c0 fs/gfs2/bmap.c:1837 stack backtrace: CPU: 0 PID: 12083 Comm: syz.0.1858 Not tainted 6.1.140-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 check_noncircular+0x274/0x310 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+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x120/0xaf0 kernel/locking/mutex.c:747 do_qc+0xca/0x730 fs/gfs2/quota.c:682 gfs2_quota_change+0x2f5/0x8e0 fs/gfs2/quota.c:1295 punch_hole+0x304c/0x35c0 fs/gfs2/bmap.c:1938 evict_unlinked_inode+0x1a3/0x6d0 fs/gfs2/super.c:1398 gfs2_evict_inode+0x6a7/0x1170 fs/gfs2/super.c:1497 evict+0x485/0x870 fs/inode.c:705 __dentry_kill+0x431/0x650 fs/dcache.c:611 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfa/0x1d0 fs/dcache.c:918 __fput+0x5e0/0x920 fs/file_table.c:328 task_work_run+0x1ca/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fa9a178e969 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:00007fa9a25d8038 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 00007fa9a19b5fa0 RCX: 00007fa9a178e969 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fa9a1810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa9a19b5fa0 R15: 00007ffe7ffe4158