syzbot


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

Status: auto-closed as invalid on 2022/07/13 16:08
Subsystems: exfat
[Documentation on labels]
First crash: 729d, last: 687d
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 (2) exfat 2 941d 946d 0/26 auto-closed as invalid on 2021/11/01 19:34
upstream KCSAN: data-race in __fat_write_inode / copy_page_to_iter exfat 2 1015d 1032d 0/26 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 0xffff8881264e863c of 4 bytes by task 12693 on cpu 1:
 __fat_write_inode+0x244/0x4e0 fs/fat/inode.c:885
 fat_write_inode+0xb9/0xd0 fs/fat/inode.c:919
 write_inode+0x89/0x1f0 fs/fs-writeback.c:1434
 __writeback_single_inode+0x2c6/0x590 fs/fs-writeback.c:1646
 writeback_single_inode+0x126/0x4f0 fs/fs-writeback.c:1702
 sync_inode_metadata+0x52/0x70 fs/fs-writeback.c:2724
 __generic_file_fsync+0xf5/0x140 fs/libfs.c:1126
 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:3933
 do_iter_readv_writev+0x27b/0x300
 do_iter_write+0x16f/0x5c0 fs/read_write.c:868
 vfs_iter_write+0x4c/0x70 fs/read_write.c:909
 iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1262
 __do_sys_sendfile64 fs/read_write.c:1321 [inline]
 __se_sys_sendfile64 fs/read_write.c:1313 [inline]
 __x64_sys_sendfile64+0xb9/0x150 fs/read_write.c:1313
 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+0x46/0xb0

read to 0xffff8881264e8000 of 4096 bytes by task 1925 on cpu 0:
 instrument_copy_to_user include/linux/instrumented.h:119 [inline]
 copyout lib/iov_iter.c:154 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:226 [inline]
 __copy_page_to_iter lib/iov_iter.c:852 [inline]
 copy_page_to_iter+0x415/0x7b0 lib/iov_iter.c:880
 copy_folio_to_iter include/linux/uio.h:153 [inline]
 filemap_read+0x10b2/0x1400 mm/filemap.c:2730
 blkdev_read_iter+0x2c6/0x370 block/fops.c:594
 call_read_iter include/linux/fs.h:2052 [inline]
 new_sync_read fs/read_write.c:401 [inline]
 vfs_read+0x5a5/0x6a0 fs/read_write.c:482
 ksys_read+0xe8/0x1a0 fs/read_write.c:620
 __do_sys_read fs/read_write.c:630 [inline]
 __se_sys_read fs/read_write.c:628 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:628
 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+0x46/0xb0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1925 Comm: udevd Not tainted 5.19.0-rc1-syzkaller-00011-g9886142c7a22-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
I/O error, dev loop0, sector 262016 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/06/08 15:58 upstream 9886142c7a22 b2706118 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fat_write_inode / copy_page_to_iter
2022/05/16 21:56 upstream 42226c989789 744a39e2 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fat_write_inode / copy_page_to_iter
2022/05/08 10:30 upstream 30c8e80f7932 e60b1103 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fat_write_inode / copy_page_to_iter
2022/05/08 08:46 upstream 30c8e80f7932 e60b1103 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fat_write_inode / copy_page_to_iter
2022/04/27 13:28 upstream 46cf2c613f4b 1fa34c1b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fat_write_inode / copy_page_to_iter
* Struck through repros no longer work on HEAD.