syzbot


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

Status: auto-closed as invalid on 2022/01/07 07:28
Subsystems: ext4
[Documentation on labels]
First crash: 875d, last: 875d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs (3) ext4 1 1122d 1122d 0/26 auto-closed as invalid on 2021/05/05 19:41
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs (2) ext4 1 1287d 1287d 0/26 auto-closed as invalid on 2020/11/21 16:04
upstream KCSAN: data-race in ext4_alloc_file_blocks / mpage_process_page_bufs ext4 4 1338d 1379d 0/26 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 0xffff8881660732e8 of 8 bytes by task 20673 on cpu 0:
 i_size_write include/linux/fs.h:913 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3422 [inline]
 ext4_alloc_file_blocks+0x362/0x730 fs/ext4/extents.c:4493
 ext4_fallocate+0x2a7/0x540 fs/ext4/extents.c:4753
 vfs_fallocate+0x486/0x720 fs/open.c:307
 ksys_fallocate fs/open.c:330 [inline]
 __do_sys_fallocate fs/open.c:338 [inline]
 __se_sys_fallocate fs/open.c:336 [inline]
 __x64_sys_fallocate+0x75/0xc0 fs/open.c:336
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881660732e8 of 8 bytes by task 20635 on cpu 1:
 i_size_read include/linux/fs.h:891 [inline]
 mpage_process_page_bufs+0x34/0x560 fs/ext4/inode.c:2187
 mpage_prepare_extent_to_map+0x4f6/0x650 fs/ext4/inode.c:2621
 ext4_writepages+0xa78/0x1e80 fs/ext4/inode.c:2793
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:407 [inline]
 __filemap_fdatawrite_range mm/filemap.c:440 [inline]
 __filemap_fdatawrite mm/filemap.c:446 [inline]
 filemap_flush+0xd7/0x100 mm/filemap.c:473
 ext4_alloc_da_blocks+0x47/0x100 fs/ext4/inode.c:3103
 ext4_release_file+0x5b/0x1d0 fs/ext4/file.c:141
 __fput+0x295/0x520 fs/file_table.c:280
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000000fd14 -> 0x0000000000010000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20635 Comm: syz-executor.3 Not tainted 5.16.0-rc3-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/12/03 07:21 upstream a51e3ac43ddb 61f86278 .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.