====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.6.4572/23041 is trying to acquire lock: ffff88807e558ae8 (&sdp->sd_quota_mutex){+.+.}-{3:3}, at: do_qc+0xa1/0x5f0 fs/gfs2/quota.c:690 but task is already holding lock: ffff88804c9620c8 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1556 [inline] ffff88804c9620c8 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x1c8e/0x2e00 fs/gfs2/bmap.c:1880 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+0x46/0x2e0 kernel/locking/rwsem.c:1520 __gfs2_iomap_get+0x168/0x1390 fs/gfs2/bmap.c:862 gfs2_iomap_get+0xef/0x170 fs/gfs2/bmap.c:1440 bh_get+0x251/0x760 fs/gfs2/quota.c:402 qdsb_get+0x210/0x330 fs/gfs2/quota.c:536 gfs2_quota_hold+0x191/0x5c0 fs/gfs2/quota.c:616 gfs2_dinode_dealloc fs/gfs2/super.c:1229 [inline] evict_unlinked_inode fs/gfs2/super.c:1440 [inline] gfs2_evict_inode+0xf1f/0x13c0 fs/gfs2/super.c:1526 evict+0x4b3/0x9d0 fs/inode.c:702 do_unlinkat+0x38c/0x590 fs/namei.c:4465 __do_sys_unlink fs/namei.c:4506 [inline] __se_sys_unlink fs/namei.c:4504 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4504 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&sdp->sd_quota_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 do_qc+0xa1/0x5f0 fs/gfs2/quota.c:690 gfs2_quota_change+0x28f/0x7a0 fs/gfs2/quota.c:1290 punch_hole+0x282f/0x2e00 fs/gfs2/bmap.c:1981 evict_unlinked_inode fs/gfs2/super.c:1423 [inline] gfs2_evict_inode+0xdf1/0x13c0 fs/gfs2/super.c:1526 evict+0x4b3/0x9d0 fs/inode.c:702 __dentry_kill+0x412/0x630 fs/dcache.c:613 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfe/0x1e0 fs/dcache.c:920 __fput+0x5b2/0x940 fs/file_table.c:426 task_work_run+0x1d4/0x260 kernel/task_work.c:245 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0x986/0x2530 kernel/exit.c:890 do_group_exit+0x22d/0x2f0 kernel/exit.c:1032 get_signal+0x12a6/0x1390 kernel/signal.c:2927 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 irqentry_exit_to_user_mode+0x9/0x30 kernel/entry/common.c:318 exc_page_fault+0x8c/0x100 arch/x86/mm/fault.c:1519 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 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.6.4572/23041: #0: ffff88806be96608 (sb_internal#3){.+.+}-{0:0}, at: gfs2_trans_begin+0x6f/0xe0 fs/gfs2/trans.c:118 #1: ffff88807e559060 (&sdp->sd_log_flush_lock){.+.+}-{3:3}, at: __gfs2_trans_begin+0x537/0x8b0 fs/gfs2/trans.c:87 #2: ffff88804c9620c8 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1556 [inline] #2: ffff88804c9620c8 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x1c8e/0x2e00 fs/gfs2/bmap.c:1880 stack backtrace: CPU: 0 PID: 23041 Comm: syz.6.4572 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xce0 kernel/locking/mutex.c:747 do_qc+0xa1/0x5f0 fs/gfs2/quota.c:690 gfs2_quota_change+0x28f/0x7a0 fs/gfs2/quota.c:1290 punch_hole+0x282f/0x2e00 fs/gfs2/bmap.c:1981 evict_unlinked_inode fs/gfs2/super.c:1423 [inline] gfs2_evict_inode+0xdf1/0x13c0 fs/gfs2/super.c:1526 evict+0x4b3/0x9d0 fs/inode.c:702 __dentry_kill+0x412/0x630 fs/dcache.c:613 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xfe/0x1e0 fs/dcache.c:920 __fput+0x5b2/0x940 fs/file_table.c:426 task_work_run+0x1d4/0x260 kernel/task_work.c:245 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0x986/0x2530 kernel/exit.c:890 do_group_exit+0x22d/0x2f0 kernel/exit.c:1032 get_signal+0x12a6/0x1390 kernel/signal.c:2927 arch_do_signal_or_restart+0xc2/0x7b0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213 irqentry_exit_to_user_mode+0x9/0x30 kernel/entry/common.c:318 exc_page_fault+0x8c/0x100 arch/x86/mm/fault.c:1519 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608 RIP: 0033:0x7f29843a94e1 Code: Unable to access opcode bytes at 0x7f29843a94b7. RSP: 002b:ffffffffffffffa0 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f2984625fa0 RCX: 00007f29843a94d9 RDX: 0000000000000000 RSI: ffffffffffffffa0 RDI: 0000000000000600 RBP: 00007f298443804e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f2984626038 R14: 00007f2984625fa0 R15: 00007ffe92faf088