syzbot


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

Status: auto-closed as invalid on 2021/02/01 14:36
Reported-by: syzbot+9e3622a7c6372cb1e757@syzkaller.appspotmail.com
First crash: 653d, last: 594d
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 494d 529d 0/23 auto-closed as invalid on 2021/05/17 08:51
upstream KCSAN: data-race in ext4_handle_inode_extension / mpage_process_page_bufs 2 697d 707d 0/23 auto-closed as invalid on 2020/10/22 04:02

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

write to 0xffff88810dbe6ad0 of 8 bytes by task 15675 on cpu 1:
 i_size_write include/linux/fs.h:870 [inline]
 ext4_update_inode_size fs/ext4/ext4.h:3285 [inline]
 ext4_handle_inode_extension+0x226/0x550 fs/ext4/file.c:332
 ext4_dio_write_iter fs/ext4/file.c:558 [inline]
 ext4_file_write_iter+0xe48/0x1090 fs/ext4/file.c:662
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4b0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5db/0xca0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1318 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1304
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810dbe6ad0 of 8 bytes by task 15678 on cpu 0:
 i_size_read include/linux/fs.h:848 [inline]
 mpage_process_page_bufs+0x34/0x5d0 fs/ext4/inode.c:2193
 mpage_prepare_extent_to_map+0x4d6/0x630 fs/ext4/inode.c:2627
 ext4_writepages+0x674/0x1e50 fs/ext4/inode.c:2755
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 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:2737 [inline]
 ext4_buffered_write_iter+0x384/0x3d0 fs/ext4/file.c:278
 ext4_file_write_iter+0x45e/0x1090 fs/ext4/file.c:503
 call_write_iter include/linux/fs.h:1901 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4b0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x42a/0x780 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:933
 splice_direct_to_actor+0x345/0x650 fs/splice.c:888
 do_splice_direct+0xf5/0x170 fs/splice.c:976
 do_sendfile+0x5db/0xca0 fs/read_write.c:1257
 __do_sys_sendfile64 fs/read_write.c:1312 [inline]
 __se_sys_sendfile64 fs/read_write.c:1304 [inline]
 __x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1304
 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: 15678 Comm: syz-executor.0 Not tainted 5.11.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/12/28 14:35 upstream 5c8fe583cce5 8259d56c .config log report info
ci2-upstream-kcsan-gce 2020/12/23 12:04 upstream 614cb5894306 c2c1d1dd .config log report info
ci2-upstream-kcsan-gce 2020/11/30 23:39 upstream b65054597872 b3a34598 .config log report info
ci2-upstream-kcsan-gce 2020/10/30 21:35 upstream 07e088730245 a6e3ac3b .config log report info