syzbot


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

Status: auto-closed as invalid on 2021/05/17 08:51
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 579d, last: 544d
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 2 747d 757d 0/24 auto-closed as invalid on 2020/10/22 04:02
upstream KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs (2) 4 644d 665d 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 0xffff88810eca47f0 of 8 bytes by task 26615 on cpu 1:
 i_size_write include/linux/fs.h:872 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3292 [inline]
 ext4_handle_inode_extension+0x226/0x550 fs/ext4/file.c:331
 ext4_dio_write_iter fs/ext4/file.c:557 [inline]
 ext4_file_write_iter+0xef4/0x10b0 fs/ext4/file.c:661
 call_write_iter include/linux/fs.h:1977 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x7a6/0xe20 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88810eca47f0 of 8 bytes by task 26616 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+0x674/0x1e70 fs/ext4/inode.c:2756
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:424
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:763
 ext4_sync_file+0x105/0x6e0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2843 [inline]
 ext4_buffered_write_iter+0x38f/0x3e0 fs/ext4/file.c:277
 ext4_file_write_iter+0x48a/0x10b0 fs/ext4/file.c:502
 call_write_iter include/linux/fs.h:1977 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x7a6/0xe20 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26616 Comm: syz-executor.1 Tainted: G        W         5.12.0-rc6-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 2021/04/07 23:04 upstream 3a22981230f9 6a81331a .config log report info KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs
ci2-upstream-kcsan-gce 2021/03/03 23:39 upstream f69d02e37a85 06ed56cd .config log report info KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs
* Struck through repros no longer work on HEAD.