====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.17/4459 is trying to acquire lock: ffff0000d3628ae0 (&sdp->sd_quota_mutex){+.+.}-{3:3}, at: do_qc+0xc0/0x658 fs/gfs2/quota.c:682 but task is already holding lock: ffff0000f24d85e8 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1529 [inline] ffff0000f24d85e8 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x222c/0x3018 fs/gfs2/bmap.c:1854 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+0x64/0x300 kernel/locking/rwsem.c:1520 __gfs2_iomap_get+0x118/0x10fc fs/gfs2/bmap.c:862 gfs2_iomap_get+0xd4/0x144 fs/gfs2/bmap.c:1413 bh_get+0x1e8/0x608 fs/gfs2/quota.c:385 qdsb_get+0x1c4/0x370 fs/gfs2/quota.c:522 gfs2_quota_hold+0x16c/0x550 fs/gfs2/quota.c:608 punch_hole+0xc20/0x3018 fs/gfs2/bmap.c:1815 gfs2_iomap_end+0x4a4/0x670 fs/gfs2/bmap.c:1174 iomap_iter+0x1d8/0x1074 fs/iomap/iter.c:79 iomap_file_buffered_write+0x574/0x690 fs/iomap/buffered-io.c:842 gfs2_file_buffered_write+0x47c/0x7c8 fs/gfs2/file.c:1057 gfs2_file_write_iter+0x3f8/0xc2c fs/gfs2/file.c:1158 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2f4/0x5c4 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x10dc/0x1c90 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2866 do_signal arch/arm64/kernel/signal.c:1095 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1148 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xb4/0x144 arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (&sdp->sd_quota_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 do_qc+0xc0/0x658 fs/gfs2/quota.c:682 gfs2_quota_change+0x238/0x718 fs/gfs2/quota.c:1295 punch_hole+0x2ac0/0x3018 fs/gfs2/bmap.c:1955 gfs2_iomap_end+0x4a4/0x670 fs/gfs2/bmap.c:1174 iomap_iter+0x1d8/0x1074 fs/iomap/iter.c:79 iomap_file_buffered_write+0x574/0x690 fs/iomap/buffered-io.c:842 gfs2_file_buffered_write+0x47c/0x7c8 fs/gfs2/file.c:1057 gfs2_file_write_iter+0x3f8/0xc2c fs/gfs2/file.c:1158 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2f4/0x5c4 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x10dc/0x1c90 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2866 do_signal arch/arm64/kernel/signal.c:1095 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1148 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xb4/0x144 arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 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 *** 5 locks held by syz.0.17/4459: #0: ffff0000d319c460 (sb_writers#12){.+.+}-{0:0}, at: do_coredump+0x10b8/0x1c90 fs/coredump.c:823 #1: ffff0000f24d8150 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff0000f24d8150 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: gfs2_file_write_iter+0x2d8/0xc2c fs/gfs2/file.c:1115 #2: ffff0000d319c650 (sb_internal#2){.+.+}-{0:0}, at: gfs2_trans_begin+0xa8/0x114 fs/gfs2/trans.c:118 #3: ffff0000d3629058 (&sdp->sd_log_flush_lock){.+.+}-{3:3}, at: __gfs2_trans_begin+0x50c/0x884 fs/gfs2/trans.c:87 #4: ffff0000f24d85e8 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1529 [inline] #4: ffff0000f24d85e8 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x222c/0x3018 fs/gfs2/bmap.c:1854 stack backtrace: CPU: 1 PID: 4459 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/2026 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x264/0x2f8 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 do_qc+0xc0/0x658 fs/gfs2/quota.c:682 gfs2_quota_change+0x238/0x718 fs/gfs2/quota.c:1295 punch_hole+0x2ac0/0x3018 fs/gfs2/bmap.c:1955 gfs2_iomap_end+0x4a4/0x670 fs/gfs2/bmap.c:1174 iomap_iter+0x1d8/0x1074 fs/iomap/iter.c:79 iomap_file_buffered_write+0x574/0x690 fs/iomap/buffered-io.c:842 gfs2_file_buffered_write+0x47c/0x7c8 fs/gfs2/file.c:1057 gfs2_file_write_iter+0x3f8/0xc2c fs/gfs2/file.c:1158 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2f4/0x5c4 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x10dc/0x1c90 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2866 do_signal arch/arm64/kernel/signal.c:1095 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1148 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xb4/0x144 arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585