syzbot


KCSAN: data-race in __mpage_writepage / truncate_setsize (3)

Status: auto-closed as invalid on 2020/10/22 12:12
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 888d, last: 863d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (6) 1 553d 553d 0/24 auto-closed as invalid on 2021/08/28 08:01
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (5) 1 599d 599d 0/24 auto-closed as invalid on 2021/07/13 09:33
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (4) 1 776d 776d 0/24 auto-closed as invalid on 2021/01/16 18:17
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (7) 2 286d 318d 0/24 auto-closed as invalid on 2022/05/21 16:37
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (2) 2 1000d 1013d 0/24 auto-closed as invalid on 2020/06/18 14:03
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (8) 1 198d 198d 0/24 auto-closed as invalid on 2022/08/17 17:26
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize 1 1099d 1099d 0/24 auto-closed as invalid on 2020/04/04 11:54

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __mpage_writepage / truncate_setsize

write to 0xffff88811e1fd0d8 of 8 bytes by task 13658 on cpu 0:
 i_size_write include/linux/fs.h:876 [inline]
 truncate_setsize+0x2c/0xc0 mm/truncate.c:839
 fat_setattr+0x641/0x760 fs/fat/file.c:536
 notify_change+0x7d7/0xa80 fs/attr.c:336
 do_truncate+0xe0/0x120 fs/open.c:64
 handle_truncate fs/namei.c:2909 [inline]
 do_open fs/namei.c:3255 [inline]
 path_openat+0x1a31/0x20a0 fs/namei.c:3368
 do_filp_open+0xbd/0x1d0 fs/namei.c:3395
 do_sys_openat2+0x33b/0x500 fs/open.c:1168
 do_sys_open fs/open.c:1184 [inline]
 __do_sys_creat fs/open.c:1258 [inline]
 __se_sys_creat fs/open.c:1252 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1252
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88811e1fd0d8 of 8 bytes by task 13653 on cpu 1:
 i_size_read include/linux/fs.h:854 [inline]
 __mpage_writepage+0x95/0x1070 fs/mpage.c:501
 write_cache_pages+0x4cb/0x840 mm/page-writeback.c:2246
 mpage_writepages+0x6d/0x120 fs/mpage.c:714
 fat_writepages+0x20/0x30 fs/fat/inode.c:205
 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
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1072
 fat_file_fsync+0x48/0x100 fs/fat/file.c:190
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2747 [inline]
 generic_file_write_iter+0x3af/0x3e0 mm/filemap.c:3568
 call_write_iter include/linux/fs.h:1882 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x665/0x6f0 fs/read_write.c:578
 ksys_write+0xce/0x180 fs/read_write.c:631
 __do_sys_write fs/read_write.c:643 [inline]
 __se_sys_write fs/read_write.c:640 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:640
 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: 1 PID: 13653 Comm: syz-executor.2 Not tainted 5.9.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2020/09/17 12:05 upstream 5925fa68fe82 8247808b .config console log report info
ci2-upstream-kcsan-gce 2020/09/12 00:49 upstream e8878ab82545 79fb24e2 .config console log report
ci2-upstream-kcsan-gce 2020/08/22 19:20 upstream f873db9acd3c 6436ce4b .config console log report
* Struck through repros no longer work on HEAD.