syzbot


WARNING in ext4_discard_allocated_blocks

Status: upstream: reported syz repro on 2024/12/25 21:07
Reported-by: syzbot+a1e17b3bf70d9b00c4d3@syzkaller.appspotmail.com
First crash: 1d02h, last: 1d02h
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in ext4_discard_allocated_blocks ext4 C inconclusive done 4 355d 472d 25/28 fixed on 2024/02/21 18:23

Sample crash report:
EXT4-fs error (device loop4): ext4_read_block_bitmap_nowait:476: comm syz.4.20: Invalid block bitmap block 0 in block_group 0
------------[ cut here ]------------
mb_load_buddy failed (-117)
WARNING: CPU: 0 PID: 4365 at fs/ext4/mballoc.c:4325 ext4_discard_allocated_blocks+0x19c/0x660 fs/ext4/mballoc.c:4325
Modules linked in:
CPU: 0 PID: 4365 Comm: syz.4.20 Not tainted 5.15.175-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:ext4_discard_allocated_blocks+0x19c/0x660 fs/ext4/mballoc.c:4325
Code: 0c 00 00 e8 36 19 ff ff 89 c3 31 ff 89 c6 e8 bb 74 5f ff 85 db 74 67 e8 52 71 5f ff 48 c7 c7 c0 69 bc 8a 89 de e8 94 0b 2b ff <0f> 0b e9 07 03 00 00 e8 38 71 5f ff 49 83 c7 3c 4c 89 f8 48 c1 e8
RSP: 0018:ffffc90003e9ed00 EFLAGS: 00010246
RAX: 3111280a60ba2300 RBX: 00000000ffffff8b RCX: ffff888026555940
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc90003e9ee30 R08: ffffffff8166aa6c R09: ffffed10171c4f24
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920007d3dac
R13: dffffc0000000000 R14: ffff8880713b0a0c R15: ffff8880713b09c0
FS:  00007fa7e5f036c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8a54472d00 CR3: 0000000077deb000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ext4_mb_new_blocks+0x1527/0x4d60
 ext4_ext_map_blocks+0x1b01/0x7630 fs/ext4/extents.c:4339
 ext4_map_blocks+0xa66/0x1c70 fs/ext4/inode.c:672
 _ext4_get_block+0x23b/0x660 fs/ext4/inode.c:815
 ext4_block_write_begin+0x6b0/0x13a0 fs/ext4/inode.c:1100
 ext4_write_begin+0x6c6/0x15f0
 ext4_da_write_begin+0x342/0xb60 fs/ext4/inode.c:2974
 generic_perform_write+0x2bf/0x5b0 mm/filemap.c:3785
 ext4_buffered_write_iter+0x227/0x360 fs/ext4/file.c:268
 ext4_file_write_iter+0x1d1/0x1940 fs/ext4/file.c:662
 call_write_iter include/linux/fs.h:2174 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xacd/0xe50 fs/read_write.c:594
 ksys_write+0x1a2/0x2c0 fs/read_write.c:647
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fa7e6c8ad29
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa7e5f03038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fa7e6e7afa0 RCX: 00007fa7e6c8ad29
RDX: 000000000000a000 RSI: 0000000020000780 RDI: 0000000000000005
RBP: 00007fa7e6d06aa8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fa7e6e7afa0 R15: 00007ffec9da4688
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/25 21:06 linux-5.15.y 91786f140358 444551c4 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan WARNING in ext4_discard_allocated_blocks
* Struck through repros no longer work on HEAD.