EXT4-fs error (device loop0) in ext4_reserve_inode_write:6081: Out of memory ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:2981! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 1113 Comm: syz-executor.0 Not tainted 5.4.233-syzkaller-00026-gda100c5e0cf5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2981 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0xf29/0xf40 fs/ext4/mballoc.c:1116 Code: ff e8 9b 11 ce ff e9 0a f3 ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 52 f3 ff ff e8 a1 11 ce ff e9 48 f3 ff ff e8 d7 8c a0 ff <0f> 0b e8 d0 8c a0 ff 0f 0b e8 c9 8c a0 ff 0f 0b e8 c2 8c a0 ff 0f RSP: 0018:ffff8881dbaa6708 EFLAGS: 00010293 RAX: ffffffff81c2ace9 RBX: 0000000000000001 RCX: ffff8881e7d65e80 RDX: 0000000000000000 RSI: 00000000ffffd331 RDI: 0000000000000001 RBP: ffff8881ec704000 R08: ffffffff81c29e92 R09: ffffed103b39f118 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1103d8e047e R13: dffffc0000000000 R14: 00000000ffffd331 R15: ffff8881ec7023f0 FS: 00007fed5f04f700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002010003f CR3: 00000001e1ea0000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_discard_preallocations+0x603/0xb90 fs/ext4/mballoc.c:4101 ext4_truncate+0xa9a/0x1290 fs/ext4/inode.c:4647 ext4_truncate_failed_write fs/ext4/truncate.h:20 [inline] ext4_write_begin+0xd5e/0x1900 fs/ext4/inode.c:1398 ext4_da_write_begin+0x4a3/0xfe0 fs/ext4/inode.c:3119 generic_perform_write+0x2c7/0x560 mm/filemap.c:3311 __generic_file_write_iter+0x239/0x490 mm/filemap.c:3440 ext4_file_write_iter+0x499/0x10e0 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1981 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0x5d3/0x750 fs/read_write.c:496 __kernel_write+0x10f/0x350 fs/read_write.c:515 dump_emit+0x213/0x350 fs/coredump.c:838 elf_core_dump+0x3e06/0x4730 fs/binfmt_elf.c:2352 do_coredump+0x1fd7/0x2da0 fs/coredump.c:801 get_signal+0xd66/0x13f0 kernel/signal.c:2729 do_signal+0xb0/0x11f0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc0/0x1a0 arch/x86/entry/common.c:159 prepare_exit_to_usermode+0x199/0x200 arch/x86/entry/common.c:194 retint_user+0x8/0x8 Modules linked in: ---[ end trace a8f2840a85a21d60 ]--- RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2981 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0xf29/0xf40 fs/ext4/mballoc.c:1116 Code: ff e8 9b 11 ce ff e9 0a f3 ff ff 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 52 f3 ff ff e8 a1 11 ce ff e9 48 f3 ff ff e8 d7 8c a0 ff <0f> 0b e8 d0 8c a0 ff 0f 0b e8 c9 8c a0 ff 0f 0b e8 c2 8c a0 ff 0f RSP: 0018:ffff8881dbaa6708 EFLAGS: 00010293 RAX: ffffffff81c2ace9 RBX: 0000000000000001 RCX: ffff8881e7d65e80 RDX: 0000000000000000 RSI: 00000000ffffd331 RDI: 0000000000000001 RBP: ffff8881ec704000 R08: ffffffff81c29e92 R09: ffffed103b39f118 R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1103d8e047e R13: dffffc0000000000 R14: 00000000ffffd331 R15: ffff8881ec7023f0 FS: 00007fed5f04f700(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055555637d6d0 CR3: 00000001e1ea0000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400