syzbot


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

Status: auto-closed as invalid on 2020/06/18 14:03
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1021d, last: 1008d
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 560d 560d 0/24 auto-closed as invalid on 2021/08/28 08:01
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (3) 3 870d 895d 0/24 auto-closed as invalid on 2020/10/22 12:12
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (5) 1 606d 606d 0/24 auto-closed as invalid on 2021/07/13 09:33
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (4) 1 783d 783d 0/24 auto-closed as invalid on 2021/01/16 18:17
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (7) 2 294d 325d 0/24 auto-closed as invalid on 2022/05/21 16:37
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize (8) 1 205d 205d 0/24 auto-closed as invalid on 2022/08/17 17:26
upstream KCSAN: data-race in __mpage_writepage / truncate_setsize 1 1106d 1106d 0/24 auto-closed as invalid on 2020/04/04 11:54

Sample crash report:
loop5: rw=2049, want=81, limit=63
==================================================================
BUG: KCSAN: data-race in __mpage_writepage / truncate_setsize

write to 0xffff888120eabcb8 of 8 bytes by task 16972 on cpu 1:
 i_size_write include/linux/fs.h:894 [inline]
 truncate_setsize+0x34/0x80 mm/truncate.c:839
 fat_setattr+0x7c5/0x810 fs/fat/file.c:536
 notify_change+0x82b/0xad0 fs/attr.c:336
 do_truncate+0xf9/0x180 fs/open.c:64
 do_sys_ftruncate+0x315/0x340 fs/open.c:195
 __do_sys_ftruncate fs/open.c:205 [inline]
 __se_sys_ftruncate fs/open.c:203 [inline]
 __x64_sys_ftruncate+0x3c/0x50 fs/open.c:203
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888120eabcb8 of 8 bytes by task 16963 on cpu 0:
 __mpage_writepage+0xb5/0xdc0 fs/mpage.c:517
 write_cache_pages+0x400/0xa10 mm/page-writeback.c:2238
 mpage_writepages+0xab/0x180 fs/mpage.c:730
 fat_writepages+0x2a/0x40 fs/fat/inode.c:205
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
 file_write_and_wait_range+0xfb/0x160 mm/filemap.c:760
 __generic_file_fsync+0x55/0x180 fs/libfs.c:1072
 fat_file_fsync+0x54/0x120 fs/fat/file.c:190
 vfs_fsync_range+0x7c/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2872 [inline]
 generic_file_write_iter+0x31c/0x38e mm/filemap.c:3467
 call_write_iter include/linux/fs.h:1907 [inline]
 new_sync_write+0x303/0x400 fs/read_write.c:484
 __vfs_write+0x9e/0xb0 fs/read_write.c:497
 vfs_write fs/read_write.c:559 [inline]
 vfs_write+0x189/0x380 fs/read_write.c:543
 ksys_write+0xc5/0x1a0 fs/read_write.c:612
 __do_sys_write fs/read_write.c:624 [inline]
 __se_sys_write fs/read_write.c:621 [inline]
 __x64_sys_write+0x49/0x60 fs/read_write.c:621
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16963 Comm: syz-executor.5 Not tainted 5.7.0-rc1-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 Assets Title
ci2-upstream-kcsan-gce 2020/05/02 12:36 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 58da4c35 .config console log report
ci2-upstream-kcsan-gce 2020/04/19 13:09 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 6dfd45e1 .config console log report
* Struck through repros no longer work on HEAD.