EXT4-fs error (device loop3): ext4_dirty_inode:6024: inode #19: comm syz-executor.3: mark_inode_dirty error ------------[ cut here ]------------ kernel BUG at fs/ext4/mballoc.c:4338! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 2727 Comm: syz-executor.3 Not tainted 5.15.148-syzkaller-1069101-gad06eaf051cd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:ext4_mb_use_inode_pa+0x6b0/0x720 fs/ext4/mballoc.c:4338 Code: 48 c7 c7 e0 c5 49 86 4c 89 fe 48 89 da e8 98 db 98 00 e9 9c fc ff ff e8 3e 45 84 ff 0f 0b e8 37 45 84 ff 0f 0b e8 30 45 84 ff <0f> 0b e8 29 45 84 ff 0f 0b 48 8b 4d d0 80 e1 07 80 c1 03 38 c1 0f RSP: 0018:ffffc900024269e0 EFLAGS: 00010293 RAX: ffffffff81ebdad0 RBX: ffff88810fdce8d8 RCX: ffff8881175e62c0 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffffc90002426a68 R08: ffffffff81ebd7af R09: ffffed1021fb9d18 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000002 R13: ffff88810fdce8d8 R14: 00000000ffffffff R15: 1ffff11021fb9d1b FS: 00007f3abcda56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7f65be7000 CR3: 000000011cbd9000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_mb_use_preallocated+0xb0b/0xcb0 fs/ext4/mballoc.c:4436 ext4_mb_new_blocks+0x593/0x43f0 fs/ext4/mballoc.c:5673 ext4_ext_map_blocks+0x1a0d/0x7250 fs/ext4/extents.c:4287 ext4_map_blocks+0xaa7/0x1e00 fs/ext4/inode.c:646 _ext4_get_block+0x23b/0x660 fs/ext4/inode.c:793 ext4_get_block_unwritten+0x2a/0x40 fs/ext4/inode.c:824 ext4_block_write_begin+0x5ea/0x12a0 fs/ext4/inode.c:1078 ext4_write_begin+0x6bc/0x13d0 ext4_da_write_begin+0x4a2/0xc30 fs/ext4/inode.c:2976 generic_perform_write+0x2bc/0x5a0 mm/filemap.c:3847 ext4_buffered_write_iter+0x48a/0x610 fs/ext4/file.c:270 ext4_file_write_iter+0x443/0x1c80 call_write_iter include/linux/fs.h:2202 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0xd5d/0x1110 fs/read_write.c:594 ksys_write+0x199/0x2c0 fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __x64_sys_write+0x7b/0x90 fs/read_write.c:656 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f3abd2228d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3abcda50c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f3abd341f80 RCX: 00007f3abd2228d9 RDX: 000000000208e24b RSI: 0000000020000000 RDI: 0000000000000006 RBP: 00007f3abd27ead0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f3abd341f80 R15: 00007fff4bc850d8 Modules linked in: ---[ end trace d12ef6d8a6a40b15 ]--- RIP: 0010:ext4_mb_use_inode_pa+0x6b0/0x720 fs/ext4/mballoc.c:4338 Code: 48 c7 c7 e0 c5 49 86 4c 89 fe 48 89 da e8 98 db 98 00 e9 9c fc ff ff e8 3e 45 84 ff 0f 0b e8 37 45 84 ff 0f 0b e8 30 45 84 ff <0f> 0b e8 29 45 84 ff 0f 0b 48 8b 4d d0 80 e1 07 80 c1 03 38 c1 0f RSP: 0018:ffffc900024269e0 EFLAGS: 00010293 RAX: ffffffff81ebdad0 RBX: ffff88810fdce8d8 RCX: ffff8881175e62c0 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffffc90002426a68 R08: ffffffff81ebd7af R09: ffffed1021fb9d18 R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000002 R13: ffff88810fdce8d8 R14: 00000000ffffffff R15: 1ffff11021fb9d1b FS: 00007f3abcda56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7f65be7000 CR3: 000000011cbd9000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400