syzbot


KCSAN: data-race in __mpage_writepage / truncate_setsize

Status: auto-closed as invalid on 2020/04/04 11:54
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1099d, last: 1099d
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 (3) 3 863d 888d 0/24 auto-closed as invalid on 2020/10/22 12:12
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 1001d 1014d 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

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

write to 0xffff8880ad188438 of 8 bytes by task 17559 on cpu 1:
 i_size_write include/linux/fs.h:888 [inline]
 truncate_setsize+0x3a/0x90 mm/truncate.c:839
 fat_setattr+0x7fa/0x840 fs/fat/file.c:536
 notify_change+0x7e1/0xaa0 fs/attr.c:337
 do_truncate+0xfb/0x180 fs/open.c:64
 handle_truncate fs/namei.c:3015 [inline]
 do_last fs/namei.c:3426 [inline]
 path_openat+0x13e8/0x3580 fs/namei.c:3537
 do_filp_open+0x11e/0x1b0 fs/namei.c:3567
 do_sys_open+0x3b3/0x4f0 fs/open.c:1097
 ksys_open include/linux/syscalls.h:1385 [inline]
 __do_sys_creat fs/open.c:1155 [inline]
 __se_sys_creat fs/open.c:1153 [inline]
 __x64_sys_creat+0x45/0x60 fs/open.c:1153
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880ad188438 of 8 bytes by task 17547 on cpu 0:
 __mpage_writepage+0xc1/0xe70 fs/mpage.c:517
 write_cache_pages+0x47a/0xb40 mm/page-writeback.c:2238
 mpage_writepages+0xab/0x180 fs/mpage.c:730
 fat_writepages+0x2e/0x40 fs/fat/inode.c:204
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
 file_write_and_wait_range+0xfd/0x160 mm/filemap.c:782
 __generic_file_fsync+0x59/0x190 fs/libfs.c:1000
 fat_file_fsync+0x58/0x120 fs/fat/file.c:190
 vfs_fsync_range+0x82/0x150 fs/sync.c:197
 generic_write_sync include/linux/fs.h:2856 [inline]
 generic_file_write_iter+0x318/0x38c mm/filemap.c:3474
 call_write_iter include/linux/fs.h:1902 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17547 Comm: syz-executor.3 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2020/01/25 11:51 https://github.com/google/ktsan.git kcsan 245a43005292 2e95ab33 .config console log report
* Struck through repros no longer work on HEAD.