syzbot


KCSAN: data-race in delete_from_page_cache_batch / file_write_and_wait_range (2)

Status: auto-closed as invalid on 2022/01/30 10:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 337d, last: 337d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in delete_from_page_cache_batch / file_write_and_wait_range 1 593d 593d 0/24 auto-closed as invalid on 2021/05/19 11:34

Sample crash report:
==================================================================
BUG: KCSAN: data-race in delete_from_page_cache_batch / file_write_and_wait_range

write to 0xffff88812a685340 of 8 bytes by task 27993 on cpu 1:
 page_cache_delete_batch mm/filemap.c:335 [inline]
 delete_from_page_cache_batch+0x5b2/0x780 mm/filemap.c:353
 truncate_inode_pages_range+0x1d5/0xa00 mm/truncate.c:336
 truncate_pagecache_range+0x80/0x90 mm/truncate.c:864
 ext4_punch_hole+0x2d6/0x800 fs/ext4/inode.c:4014
 ext4_fallocate+0xc9/0x480 fs/ext4/extents.c:4703
 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 0xffff88812a685340 of 8 bytes by task 27989 on cpu 0:
 mapping_needs_writeback mm/filemap.c:646 [inline]
 file_write_and_wait_range+0x4b/0x1d0 mm/filemap.c:823
 ext4_sync_file+0xad/0x570 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:182
 generic_write_sync include/linux/fs.h:2955 [inline]
 ext4_buffered_write_iter+0x22f/0x290 fs/ext4/file.c:277
 ext4_file_write_iter+0x22b/0xdc0
 call_write_iter include/linux/fs.h:2162 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 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

value changed: 0x0000000000001000 -> 0x0000000000000fff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 27989 Comm: syz-executor.4 Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/26 10:21 upstream 438645193e59 e4f103c4 .config log report info KCSAN: data-race in delete_from_page_cache_batch / file_write_and_wait_range
* Struck through repros no longer work on HEAD.