====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/5381 is trying to acquire lock: ffff88814cdfe3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: __jbd2_log_wait_for_space+0x198/0x470 fs/jbd2/checkpoint.c:71 but task is already holding lock: ffff88807182abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff88807182abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_buffered_write_iter+0xa6/0x3b0 fs/ext4/file.c:262 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 inode_lock_shared include/linux/fs.h:797 [inline] ext4_bmap+0x4d/0x3f0 fs/ext4/inode.c:3166 bmap+0xa2/0xd0 fs/inode.c:1820 jbd2_journal_bmap fs/jbd2/journal.c:981 [inline] __jbd2_journal_erase fs/jbd2/journal.c:1795 [inline] jbd2_journal_flush+0x655/0xcc0 fs/jbd2/journal.c:2515 ext4_ioctl_checkpoint fs/ext4/ioctl.c:850 [inline] __ext4_ioctl fs/ext4/ioctl.c:1276 [inline] ext4_ioctl+0x3151/0x3870 fs/ext4/ioctl.c:1285 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 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 (&journal->j_checkpoint_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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 mutex_lock_io_nested+0x43/0x60 kernel/locking/mutex.c:777 __jbd2_log_wait_for_space+0x198/0x470 fs/jbd2/checkpoint.c:71 add_transaction_credits+0x946/0xc80 fs/jbd2/transaction.c:299 start_this_handle+0x74d/0x15c0 fs/jbd2/transaction.c:423 jbd2__journal_start+0x2b7/0x5a0 fs/jbd2/transaction.c:521 __ext4_journal_start_sb+0x167/0x360 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x8b/0x100 fs/ext4/inode.c:6074 __mark_inode_dirty+0x2c8/0xc90 fs/fs-writeback.c:2480 mark_inode_dirty include/linux/fs.h:2468 [inline] generic_write_end+0x24d/0x3d0 fs/buffer.c:2204 ext4_da_write_end+0x6f6/0x9c0 fs/ext4/inode.c:3098 generic_perform_write+0x350/0x550 mm/filemap.c:3796 ext4_buffered_write_iter+0x25f/0x3b0 fs/ext4/file.c:268 ext4_file_write_iter+0x74d/0x1700 fs/ext4/file.c:-1 __kernel_write+0x51c/0x970 fs/read_write.c:539 __dump_emit+0x249/0x370 fs/coredump.c:943 dump_user_range+0x84/0x340 fs/coredump.c:1017 elf_core_dump+0x2fbd/0x3500 fs/binfmt_elf.c:2285 do_coredump+0x14c7/0x2ac0 fs/coredump.c:894 get_signal+0x410/0x12d0 kernel/signal.c:2886 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#9); lock(&journal->j_checkpoint_mutex); lock(&sb->s_type->i_mutex_key#9); lock(&journal->j_checkpoint_mutex); *** DEADLOCK *** 2 locks held by syz-executor.1/5381: #0: ffff88814cdfa460 (sb_writers#5){.+.+}-{0:0}, at: do_coredump+0x1492/0x2ac0 fs/coredump.c:893 #1: ffff88807182abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #1: ffff88807182abd0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_buffered_write_iter+0xa6/0x3b0 fs/ext4/file.c:262 stack backtrace: CPU: 1 PID: 5381 Comm: syz-executor.1 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 mutex_lock_io_nested+0x43/0x60 kernel/locking/mutex.c:777 __jbd2_log_wait_for_space+0x198/0x470 fs/jbd2/checkpoint.c:71 add_transaction_credits+0x946/0xc80 fs/jbd2/transaction.c:299 start_this_handle+0x74d/0x15c0 fs/jbd2/transaction.c:423 jbd2__journal_start+0x2b7/0x5a0 fs/jbd2/transaction.c:521 __ext4_journal_start_sb+0x167/0x360 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x8b/0x100 fs/ext4/inode.c:6074 __mark_inode_dirty+0x2c8/0xc90 fs/fs-writeback.c:2480 mark_inode_dirty include/linux/fs.h:2468 [inline] generic_write_end+0x24d/0x3d0 fs/buffer.c:2204 ext4_da_write_end+0x6f6/0x9c0 fs/ext4/inode.c:3098 generic_perform_write+0x350/0x550 mm/filemap.c:3796 ext4_buffered_write_iter+0x25f/0x3b0 fs/ext4/file.c:268 ext4_file_write_iter+0x74d/0x1700 fs/ext4/file.c:-1 __kernel_write+0x51c/0x970 fs/read_write.c:539 __dump_emit+0x249/0x370 fs/coredump.c:943 dump_user_range+0x84/0x340 fs/coredump.c:1017 elf_core_dump+0x2fbd/0x3500 fs/binfmt_elf.c:2285 do_coredump+0x14c7/0x2ac0 fs/coredump.c:894 get_signal+0x410/0x12d0 kernel/signal.c:2886 arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f808237f59e Code: 08 0f 85 55 ed ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08 RSP: 002b:00007f80816ecfe8 EFLAGS: 00000346 ORIG_RAX: 00000000000000db RAX: 0000000000000000 RBX: 00007f80816ed6c0 RCX: 00007f808237f59e RDX: 00007f80816ed040 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f80823bd498 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000346 R12: 0000000000000000 R13: 000000000000000b R14: 00007f808249af80 R15: 00007ffe4a0462e8