====================================================== WARNING: possible circular locking dependency detected 5.15.181-syzkaller #0 Not tainted ------------------------------------------------------ syz.1.9/4188 is trying to acquire lock: ffff0000d9550ae0 (&sdp->sd_quota_mutex){+.+.}-{3:3}, at: do_qc+0xbc/0x690 fs/gfs2/quota.c:678 but task is already holding lock: ffff0000e7a20cb0 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1514 [inline] ffff0000e7a20cb0 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x1d94/0x2cb0 fs/gfs2/bmap.c:1839 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+0xc0/0x390 kernel/locking/rwsem.c:1498 __gfs2_iomap_get+0x10c/0x100c fs/gfs2/bmap.c:858 gfs2_iomap_get fs/gfs2/bmap.c:1398 [inline] gfs2_block_map+0x2b4/0xbc8 fs/gfs2/bmap.c:1213 bh_get+0x1bc/0x51c fs/gfs2/quota.c:385 qdsb_get+0x1e0/0x3a8 fs/gfs2/quota.c:518 gfs2_quota_hold+0x16c/0x558 fs/gfs2/quota.c:604 punch_hole+0xb24/0x2cb0 fs/gfs2/bmap.c:1800 gfs2_file_dealloc+0x28/0x38 fs/gfs2/bmap.c:2162 evict_unlinked_inode+0x188/0x5b8 fs/gfs2/super.c:1302 gfs2_evict_inode+0x510/0xe58 fs/gfs2/super.c:1401 evict+0x3c8/0x810 fs/inode.c:647 iput_final fs/inode.c:1769 [inline] iput+0x6c4/0x77c fs/inode.c:1795 dentry_unlink_inode+0x360/0x438 fs/dcache.c:380 __dentry_kill+0x320/0x598 fs/dcache.c:586 dentry_kill+0xc8/0x248 fs/dcache.c:-1 dput+0x23c/0x458 fs/dcache.c:893 __fput+0x494/0x7f8 fs/file_table.c:319 ____fput+0x20/0x30 fs/file_table.c:339 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x67c/0x1f58 kernel/exit.c:874 do_group_exit+0x100/0x268 kernel/exit.c:996 get_signal+0x73c/0x1340 kernel/signal.c:2900 do_signal arch/arm64/kernel/signal.c:893 [inline] do_notify_resume+0x35c/0x3128 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (&sdp->sd_quota_mutex){+.+.}-{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+0x2928/0x651c kernel/locking/lockdep.c:5012 lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x194/0x1edc kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0xac/0x11c kernel/locking/mutex.c:743 do_qc+0xbc/0x690 fs/gfs2/quota.c:678 gfs2_quota_change+0x238/0x718 fs/gfs2/quota.c:1295 punch_hole+0x27e4/0x2cb0 fs/gfs2/bmap.c:1940 gfs2_file_dealloc+0x28/0x38 fs/gfs2/bmap.c:2162 evict_unlinked_inode+0x188/0x5b8 fs/gfs2/super.c:1302 gfs2_evict_inode+0x510/0xe58 fs/gfs2/super.c:1401 evict+0x3c8/0x810 fs/inode.c:647 iput_final fs/inode.c:1769 [inline] iput+0x6c4/0x77c fs/inode.c:1795 dentry_unlink_inode+0x360/0x438 fs/dcache.c:380 __dentry_kill+0x320/0x598 fs/dcache.c:586 dentry_kill+0xc8/0x248 fs/dcache.c:-1 dput+0x23c/0x458 fs/dcache.c:893 __fput+0x494/0x7f8 fs/file_table.c:319 ____fput+0x20/0x30 fs/file_table.c:339 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x67c/0x1f58 kernel/exit.c:874 do_group_exit+0x100/0x268 kernel/exit.c:996 get_signal+0x73c/0x1340 kernel/signal.c:2900 do_signal arch/arm64/kernel/signal.c:893 [inline] do_notify_resume+0x35c/0x3128 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 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.1.9/4188: #0: ffff0000c0c34650 (sb_internal#2){.+.+}-{0:0}, at: gfs2_trans_begin+0x120/0x1bc fs/gfs2/trans.c:118 #1: ffff0000d95510a8 (&sdp->sd_log_flush_lock){.+.+}-{3:3}, at: __gfs2_trans_begin+0x558/0x8fc fs/gfs2/trans.c:87 #2: ffff0000e7a20cb0 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1514 [inline] #2: ffff0000e7a20cb0 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x1d94/0x2cb0 fs/gfs2/bmap.c:1839 stack backtrace: CPU: 0 PID: 4188 Comm: syz.1.9 Not tainted 5.15.181-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2011 check_noncircular+0x240/0x2d4 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+0x2928/0x651c kernel/locking/lockdep.c:5012 lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x194/0x1edc kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0xac/0x11c kernel/locking/mutex.c:743 do_qc+0xbc/0x690 fs/gfs2/quota.c:678 gfs2_quota_change+0x238/0x718 fs/gfs2/quota.c:1295 punch_hole+0x27e4/0x2cb0 fs/gfs2/bmap.c:1940 gfs2_file_dealloc+0x28/0x38 fs/gfs2/bmap.c:2162 evict_unlinked_inode+0x188/0x5b8 fs/gfs2/super.c:1302 gfs2_evict_inode+0x510/0xe58 fs/gfs2/super.c:1401 evict+0x3c8/0x810 fs/inode.c:647 iput_final fs/inode.c:1769 [inline] iput+0x6c4/0x77c fs/inode.c:1795 dentry_unlink_inode+0x360/0x438 fs/dcache.c:380 __dentry_kill+0x320/0x598 fs/dcache.c:586 dentry_kill+0xc8/0x248 fs/dcache.c:-1 dput+0x23c/0x458 fs/dcache.c:893 __fput+0x494/0x7f8 fs/file_table.c:319 ____fput+0x20/0x30 fs/file_table.c:339 task_work_run+0x12c/0x1e0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x67c/0x1f58 kernel/exit.c:874 do_group_exit+0x100/0x268 kernel/exit.c:996 get_signal+0x73c/0x1340 kernel/signal.c:2900 do_signal arch/arm64/kernel/signal.c:893 [inline] do_notify_resume+0x35c/0x3128 arch/arm64/kernel/signal.c:946 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline] el0_svc+0xf0/0x1e0 arch/arm64/kernel/entry-common.c:609 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584