syzbot


KCSAN: data-race in __fat_write_inode / copy_page_to_iter (2)

Status: auto-closed as invalid on 2021/11/01 19:34
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 431d, last: 426d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fat_write_inode / copy_page_to_iter (3) 5 172d 215d 0/24 auto-closed as invalid on 2022/07/13 16:08
upstream KCSAN: data-race in __fat_write_inode / copy_page_to_iter 2 500d 518d 0/24 auto-closed as invalid on 2021/08/19 20:30

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __fat_write_inode / copy_page_to_iter

write to 0xffff88813af7369c of 4 bytes by task 26349 on cpu 1:
 __fat_write_inode+0x28a/0x520 fs/fat/inode.c:881
 fat_write_inode+0xb9/0xd0 fs/fat/inode.c:915
 write_inode+0x89/0x180 fs/fs-writeback.c:1469
 __writeback_single_inode+0x2a2/0x440 fs/fs-writeback.c:1674
 writeback_single_inode+0x17b/0x3e0 fs/fs-writeback.c:1729
 sync_inode_metadata+0x57/0x80 fs/fs-writeback.c:2748
 __generic_file_fsync+0xf5/0x140 fs/libfs.c:1099
 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:2955 [inline]
 generic_file_write_iter+0x103/0x130 mm/filemap.c:3933
 call_write_iter include/linux/fs.h:2163 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:729
 do_iter_write+0x192/0x5c0 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 iter_file_splice_write+0x43a/0x790 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x63e/0xbb0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813af73400 of 1024 bytes by task 26313 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:156 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:228 [inline]
 __copy_page_to_iter lib/iov_iter.c:805 [inline]
 copy_page_to_iter+0x2cb/0x950 lib/iov_iter.c:833
 filemap_read+0xee6/0x1220 mm/filemap.c:2683
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 blkdev_read_iter+0xb9/0xf0 block/fops.c:545
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26313 Comm: systemd-udevd Not tainted 5.15.0-rc3-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 Title
ci2-upstream-kcsan-gce 2021/09/27 19:29 upstream 5816b3e6577e 78494d16 .config log report info KCSAN: data-race in __fat_write_inode / copy_page_to_iter
ci2-upstream-kcsan-gce 2021/09/22 19:25 upstream cf1d2c3e7e2f 8cac236e .config log report info KCSAN: data-race in __fat_write_inode / copy_page_to_iter
* Struck through repros no longer work on HEAD.