syzbot


KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs (3)

Status: auto-closed as invalid on 2021/05/05 19:41
Subsystems: ext4
[Documentation on labels]
First crash: 1595d, last: 1595d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs (4) ext4 6 1 1349d 1349d 0/29 auto-closed as invalid on 2022/01/07 07:28
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs (2) ext4 6 1 1761d 1761d 0/29 auto-closed as invalid on 2020/11/21 16:04
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs ext4 6 4 1812d 1853d 0/29 auto-closed as invalid on 2020/10/01 02:48

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs

write to 0xffff888009d88b90 of 8 bytes by task 19248 on cpu 1:
 i_size_write include/linux/fs.h:872 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3292 [inline]
 ext4_alloc_file_blocks+0x352/0x720 fs/ext4/extents.c:4446
 ext4_fallocate+0x2a7/0x540 fs/ext4/extents.c:4705
 vfs_fallocate+0x479/0x6d0 fs/open.c:311
 ksys_fallocate fs/open.c:334 [inline]
 __do_sys_fallocate fs/open.c:342 [inline]
 __se_sys_fallocate fs/open.c:340 [inline]
 __x64_sys_fallocate+0x75/0xc0 fs/open.c:340
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888009d88b90 of 8 bytes by task 19244 on cpu 0:
 i_size_read include/linux/fs.h:850 [inline]
 mpage_process_page_bufs+0x34/0x5f0 fs/ext4/inode.c:2194
 mpage_prepare_extent_to_map+0x4e6/0x640 fs/ext4/inode.c:2628
 ext4_writepages+0x97b/0x1e70 fs/ext4/inode.c:2800
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:424
 __filemap_fdatawrite mm/filemap.c:432 [inline]
 filemap_flush+0x1f/0x30 mm/filemap.c:459
 ext4_alloc_da_blocks+0x4a/0x100 fs/ext4/inode.c:3166
 ext4_release_file+0x5b/0x1d0 fs/ext4/file.c:141
 __fput+0x263/0x4f0 fs/file_table.c:280
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0x8e/0x110 kernel/task_work.c:140
 get_signal+0x14d2/0x1510 kernel/signal.c:2554
 arch_do_signal_or_restart+0x2a/0x270 arch/x86/kernel/signal.c:789
 handle_signal_work kernel/entry/common.c:147 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x11a/0x1b0 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 19244 Comm: syz-executor.3 Tainted: G        W         5.12.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/03/31 19:38 upstream d19cc4bfbff1 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs
* Struck through repros no longer work on HEAD.