syzbot


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

Status: auto-closed as invalid on 2021/08/28 08:01
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 560d, last: 560d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
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 (2) 2 1008d 1021d 0/24 auto-closed as invalid on 2020/06/18 14:03
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:
BUG: KCSAN: data-race in __mpage_writepage / truncate_setsize

write to 0xffff8881370b7410 of 8 bytes by task 27356 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 truncate_setsize+0x2a/0xc0 mm/truncate.c:758
 fat_setattr+0x69a/0x7d0 fs/fat/file.c:538
 notify_change+0x8a3/0xa80 fs/attr.c:398
 do_truncate+0xe8/0x130 fs/open.c:64
 handle_truncate fs/namei.c:3030 [inline]
 do_open fs/namei.c:3378 [inline]
 path_openat+0x19b2/0x1f20 fs/namei.c:3507
 do_filp_open+0xe9/0x200 fs/namei.c:3534
 do_sys_openat2+0xa3/0x250 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_open fs/open.c:1228 [inline]
 __se_sys_open fs/open.c:1224 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1224
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881370b7410 of 8 bytes by task 27349 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 __mpage_writepage+0x93/0x1080 fs/mpage.c:499
 write_cache_pages+0x4d7/0x810 mm/page-writeback.c:2249
 mpage_writepages+0x6d/0x120 fs/mpage.c:712
 fat_writepages+0x20/0x30 fs/fat/inode.c:205
 do_writepages+0x7b/0x150 mm/page-writeback.c:2355
 __filemap_fdatawrite_range mm/filemap.c:413 [inline]
 file_write_and_wait_range+0x180/0x210 mm/filemap.c:792
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1088
 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:2987 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3819
 call_write_iter include/linux/fs.h:2114 [inline]
 aio_write+0x287/0x360 fs/aio.c:1578
 __io_submit_one fs/aio.c:1837 [inline]
 io_submit_one+0x82f/0x1350 fs/aio.c:1880
 __do_sys_io_submit fs/aio.c:1939 [inline]
 __se_sys_io_submit+0xf5/0x260 fs/aio.c:1909
 __x64_sys_io_submit+0x3f/0x50 fs/aio.c:1909
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000001f000 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27349 Comm: syz-executor.0 Not tainted 5.14.0-rc2-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 2021/07/24 07:53 upstream f0fddcec6b62 bc5f1d88 .config console log report info KCSAN: data-race in __mpage_writepage / truncate_setsize
* Struck through repros no longer work on HEAD.