EXT4-fs error (device loop3) in ext4_mb_clear_bb:5643: Filesystem failed CRC ------------[ cut here ]------------ kernel BUG at fs/ext4/inode.c:5246! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 384 Comm: syz-executor.3 Not tainted 5.10.214-syzkaller-1002110-gd3c4d815bf09 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 RIP: 0010:ext4_do_update_inode fs/ext4/inode.c:5245 [inline] RIP: 0010:ext4_mark_iloc_dirty+0x3e51/0x3e60 fs/ext4/inode.c:5841 Code: 70 ca ff e9 0f f1 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 21 f1 ff ff 48 89 df e8 f9 70 ca ff e9 14 f1 ff ff e8 7f e0 8c ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 48 89 e5 41 57 41 RSP: 0018:ffffc900010a6fc0 EFLAGS: 00010293 RAX: ffffffff81ddcb21 RBX: 0000000000000000 RCX: ffff888120af0000 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000 RBP: ffffc900010a70d0 R08: ffffffff81dda73d R09: ffffed1023a7593c R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000005 R14: 0000000000000000 R15: ffff88810f0ae000 FS: 00007fce7972c6c0(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fce7970bd58 CR3: 000000010f1ee000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __ext4_mark_inode_dirty+0x4fc/0x7b0 fs/ext4/inode.c:6043 __ext4_ext_dirty+0x133/0x1f0 fs/ext4/extents.c:182 ext4_ext_rm_leaf fs/ext4/extents.c:2716 [inline] ext4_ext_remove_space+0x201a/0x4e10 fs/ext4/extents.c:2928 ext4_ext_truncate+0x17f/0x200 fs/ext4/extents.c:4443 ext4_truncate+0xb19/0x1220 fs/ext4/inode.c:4338 ext4_setattr+0xee2/0x1780 fs/ext4/inode.c:5618 notify_change+0xbb6/0xe60 fs/attr.c:410 do_truncate+0x1ed/0x2d0 fs/open.c:65 handle_truncate fs/namei.c:3054 [inline] do_open fs/namei.c:3395 [inline] path_openat+0x298d/0x3000 fs/namei.c:3509 do_filp_open+0x21c/0x460 fs/namei.c:3536 do_sys_openat2+0x13f/0x6f0 fs/open.c:1217 do_sys_open fs/open.c:1233 [inline] __do_sys_creat fs/open.c:1307 [inline] __se_sys_creat fs/open.c:1301 [inline] __x64_sys_creat+0x11f/0x160 fs/open.c:1301 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7fce79baaea9 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:00007fce7972c0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fce79cd8f80 RCX: 00007fce79baaea9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007fce79bf74a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fce79cd8f80 R15: 00007fff24bc7598 Modules linked in: ---[ end trace a9084442c2ab8214 ]--- RIP: 0010:ext4_do_update_inode fs/ext4/inode.c:5245 [inline] RIP: 0010:ext4_mark_iloc_dirty+0x3e51/0x3e60 fs/ext4/inode.c:5841 Code: 70 ca ff e9 0f f1 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c 21 f1 ff ff 48 89 df e8 f9 70 ca ff e9 14 f1 ff ff e8 7f e0 8c ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 48 89 e5 41 57 41 RSP: 0018:ffffc900010a6fc0 EFLAGS: 00010293 RAX: ffffffff81ddcb21 RBX: 0000000000000000 RCX: ffff888120af0000 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000000 RBP: ffffc900010a70d0 R08: ffffffff81dda73d R09: ffffed1023a7593c R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 0000000000000005 R14: 0000000000000000 R15: ffff88810f0ae000 FS: 00007fce7972c6c0(0000) GS:ffff8881f7200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fce7970bd58 CR3: 000000010f1ee000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400