syzbot


KCSAN: data-race in ext4_alloc_file_blocks / ondemand_readahead

Status: auto-closed as invalid on 2021/10/22 08:09
Subsystems: ext4
[Documentation on labels]
First crash: 950d, last: 950d

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

write to 0xffff888106363758 of 8 bytes by task 5593 on cpu 0:
 i_size_write include/linux/fs.h:916 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3421 [inline]
 ext4_alloc_file_blocks+0x362/0x730 fs/ext4/extents.c:4458
 ext4_fallocate+0x2a7/0x4d0 fs/ext4/extents.c:4718
 vfs_fallocate+0x459/0x6a0 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/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106363758 of 8 bytes by task 5669 on cpu 1:
 i_size_read include/linux/fs.h:894 [inline]
 do_page_cache_ra mm/readahead.c:256 [inline]
 ondemand_readahead+0x52e/0x7c0 mm/readahead.c:552
 page_cache_sync_ra+0xaf/0xe0 mm/readahead.c:580
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3dd/0x1240 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 ext4_file_read_iter+0x1db/0x290
 call_read_iter include/linux/fs.h:2157 [inline]
 generic_file_splice_read+0x252/0x340 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x63e/0xbb0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000000 -> 0x000000000080019e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5669 Comm: syz-executor.2 Not tainted 5.15.0-rc1-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/09/17 08:03 upstream bdb575f87217 5b989942 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_alloc_file_blocks / ondemand_readahead
* Struck through repros no longer work on HEAD.