syzbot


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

Status: auto-closed as invalid on 2022/08/17 17:26
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 198d, last: 198d
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 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 0xffff888137ff3ce8 of 8 bytes by task 26928 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 truncate_setsize+0x2a/0xc0 mm/truncate.c:775
 fat_setattr+0x765/0x880 fs/fat/file.c:546
 notify_change+0x8e6/0xa00 fs/attr.c:424
 do_truncate+0xf7/0x140 fs/open.c:65
 handle_truncate fs/namei.c:3176 [inline]
 do_open fs/namei.c:3524 [inline]
 path_openat+0x1834/0x1b30 fs/namei.c:3653
 do_filp_open+0x105/0x220 fs/namei.c:3680
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1278
 do_sys_open fs/open.c:1294 [inline]
 __do_sys_open fs/open.c:1302 [inline]
 __se_sys_open fs/open.c:1298 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1298
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888137ff3ce8 of 8 bytes by task 26920 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 __mpage_writepage+0xbf/0x10d0 fs/mpage.c:468
 write_cache_pages+0x443/0xa30 mm/page-writeback.c:2334
 mpage_writepages+0x7b/0x100 fs/mpage.c:678
 fat_writepages+0x20/0x30 fs/fat/inode.c:205
 do_writepages+0x1db/0x350 mm/page-writeback.c:2443
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1115
 fat_file_fsync+0x48/0x100 fs/fat/file.c:190
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2731 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3943
 call_write_iter include/linux/fs.h:2058 [inline]
 new_sync_write fs/read_write.c:504 [inline]
 vfs_write+0x71c/0x890 fs/read_write.c:591
 ksys_write+0xe8/0x1a0 fs/read_write.c:644
 __do_sys_write fs/read_write.c:656 [inline]
 __se_sys_write fs/read_write.c:653 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:653
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000015000 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26920 Comm: syz-executor.4 Not tainted 5.19.0-rc6-syzkaller-00111-gb047602d579b-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2022/07/13 17:17 upstream b047602d579b 5d921b08 .config console log report info KCSAN: data-race in __mpage_writepage / truncate_setsize
* Struck through repros no longer work on HEAD.