syzbot


KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs

Status: auto-closed as invalid on 2020/10/22 04:02
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 753d, last: 743d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs (3) 2 540d 575d 0/24 auto-closed as invalid on 2021/05/17 08:51
upstream KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs (2) 4 640d 662d 0/24 auto-closed as invalid on 2021/02/01 14:36

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

write to 0xffff8880bb726700 of 8 bytes by task 1982 on cpu 1:
 i_size_write include/linux/fs.h:876 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3141 [inline]
 ext4_handle_inode_extension+0x214/0x530 fs/ext4/file.c:330
 ext4_dio_write_iter fs/ext4/file.c:554 [inline]
 ext4_file_write_iter+0xe17/0x1060 fs/ext4/file.c:658
 call_write_iter include/linux/fs.h:1882 [inline]
 do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:713
 do_iter_write+0x112/0x4b0 fs/read_write.c:1018
 vfs_iter_write+0x4c/0x70 fs/read_write.c:1059
 iter_file_splice_write+0x41a/0x770 fs/splice.c:750
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x95/0x160 fs/splice.c:1016
 splice_direct_to_actor+0x365/0x660 fs/splice.c:971
 do_splice_direct+0xf2/0x170 fs/splice.c:1059
 do_sendfile+0x56a/0xba0 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1601 [inline]
 __se_sys_sendfile64 fs/read_write.c:1587 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1587
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880bb726700 of 8 bytes by task 1990 on cpu 0:
 i_size_read include/linux/fs.h:854 [inline]
 mpage_submit_page fs/ext4/inode.c:2075 [inline]
 mpage_process_page_bufs+0x432/0x600 fs/ext4/inode.c:2195
 mpage_prepare_extent_to_map+0x4ec/0x650 fs/ext4/inode.c:2607
 ext4_writepages+0x682/0x1ef0 fs/ext4/inode.c:2735
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19b/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0xfc/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2747 [inline]
 ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:276
 ext4_file_write_iter+0x768/0x1060 include/linux/fs.h:784
 call_write_iter include/linux/fs.h:1882 [inline]
 do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:713
 do_iter_write+0x112/0x4b0 fs/read_write.c:1018
 vfs_iter_write+0x4c/0x70 fs/read_write.c:1059
 iter_file_splice_write+0x41a/0x770 fs/splice.c:750
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x95/0x160 fs/splice.c:1016
 splice_direct_to_actor+0x365/0x660 fs/splice.c:971
 do_splice_direct+0xf2/0x170 fs/splice.c:1059
 do_sendfile+0x56a/0xba0 fs/read_write.c:1540
 __do_sys_sendfile64 fs/read_write.c:1595 [inline]
 __se_sys_sendfile64 fs/read_write.c:1587 [inline]
 __x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1587
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1990 Comm: syz-executor.5 Not tainted 5.9.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/09/17 04:00 upstream 5925fa68fe82 8247808b .config log report info
ci2-upstream-kcsan-gce 2020/09/07 00:51 upstream a8205e310011 abf9ba4f .config log report
* Struck through repros no longer work on HEAD.