EXT4-fs error (device loop5) in ext4_reserve_inode_write:5947: Out of memory ------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:2870! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 18885 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2870 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0x1460/0x1a90 fs/ext4/mballoc.c:1116 Code: 36 04 9f ff e9 b9 f6 ff ff e8 2c df 7f ff e9 b4 f4 ff ff e8 22 df 7f ff 48 89 ef e8 1a 04 9f ff e9 51 fa ff ff e8 10 df 7f ff <0f> 0b e8 09 df 7f ff 8b 54 24 1c 44 89 e6 48 89 ef e8 da d4 ff ff RSP: 0018:ffff88803e366d00 EFLAGS: 00010293 RAX: ffff88804ba38140 RBX: ffff88803e366e40 RCX: ffffffff81e29313 RDX: 0000000000000000 RSI: ffffffff81e2a660 RDI: 0000000000000004 RBP: ffff88809e1bc080 R08: 0000000000000000 R09: 00000000fffff423 R10: 0000000000000004 R11: 0000000000000000 R12: 00000000fffff423 R13: ffff8880b39e00c0 R14: ffff88809e1bc700 R15: 0000000000000001 FS: 00007f81cab4f700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f81d4a1f988 CR3: 00000000a5d76000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: ext4_discard_preallocations+0xaf4/0xfb0 fs/ext4/mballoc.c:4090 ext4_truncate+0x74e/0x1380 fs/ext4/inode.c:4554 ext4_truncate_failed_write fs/ext4/truncate.h:20 [inline] ext4_write_begin+0xb37/0x1610 fs/ext4/inode.c:1368 ext4_da_write_begin+0x737/0x10e0 fs/ext4/inode.c:3051 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3170 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3295 ext4_file_write_iter+0x2fe/0xf20 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 dump_emit+0x183/0x300 fs/coredump.c:801 elf_core_dump+0x33c0/0x4c10 fs/binfmt_elf.c:2392 do_coredump+0x1d4e/0x2d60 fs/coredump.c:765 get_signal+0xed9/0x1f70 kernel/signal.c:2583 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode+0x277/0x2d0 arch/x86/entry/common.c:198 retint_user+0x8/0x18 RIP: 0033:0x7f81d48fe101 Code: c4 28 c3 e8 f1 19 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 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f RSP: 002b:0000000020000270 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f81d4a1e050 RCX: 00007f81d48fe0f9 RDX: 0000000020000280 RSI: 0000000020000270 RDI: 0000000080001400 RBP: 00007f81d4959ae9 R08: 0000000020006340 R09: 0000000020006340 R10: 00000000200002c0 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ffe941570cf R14: 00007f81cab4f300 R15: 0000000000022000 Modules linked in: ---[ end trace da00d979bd315050 ]--- RIP: 0010:ext4_get_group_info fs/ext4/ext4.h:2870 [inline] RIP: 0010:ext4_mb_load_buddy_gfp+0x1460/0x1a90 fs/ext4/mballoc.c:1116 Code: 36 04 9f ff e9 b9 f6 ff ff e8 2c df 7f ff e9 b4 f4 ff ff e8 22 df 7f ff 48 89 ef e8 1a 04 9f ff e9 51 fa ff ff e8 10 df 7f ff <0f> 0b e8 09 df 7f ff 8b 54 24 1c 44 89 e6 48 89 ef e8 da d4 ff ff RSP: 0018:ffff88803e366d00 EFLAGS: 00010293 RAX: ffff88804ba38140 RBX: ffff88803e366e40 RCX: ffffffff81e29313 RDX: 0000000000000000 RSI: ffffffff81e2a660 RDI: 0000000000000004 RBP: ffff88809e1bc080 R08: 0000000000000000 R09: 00000000fffff423 R10: 0000000000000004 R11: 0000000000000000 R12: 00000000fffff423 R13: ffff8880b39e00c0 R14: ffff88809e1bc700 R15: 0000000000000001 FS: 00007f81cab4f700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5ec08f6988 CR3: 00000000a5d76000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 BTRFS info (device loop3): using free space tree DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600