syzbot


KCSAN: data-race in fat_bmap / generic_write_end (2)

Status: auto-closed as invalid on 2021/09/28 00:29
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 481d, last: 459d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fat_bmap / generic_write_end 1 768d 768d 0/24 auto-closed as invalid on 2020/11/23 09:14
upstream KCSAN: data-race in fat_bmap / generic_write_end (3) 12 190d 339d 0/24 auto-closed as invalid on 2022/06/24 01:02
upstream KCSAN: data-race in fat_bmap / generic_write_end (4) 1 131d 131d 0/24 auto-closed as invalid on 2022/08/21 21:59

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fat_bmap / generic_write_end

write to 0xffff88810678c510 of 8 bytes by task 22667 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 generic_write_end+0x96/0x180 fs/buffer.c:2182
 fat_write_end+0x4a/0x160 fs/fat/inode.c:249
 generic_perform_write+0x22a/0x3c0 mm/filemap.c:3667
 __generic_file_write_iter+0x202/0x300 mm/filemap.c:3751
 generic_file_write_iter+0x75/0x130 mm/filemap.c:3815
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 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+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 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 0xffff88810678c510 of 8 bytes by task 22677 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 is_exceed_eof fs/fat/cache.c:340 [inline]
 fat_bmap+0x1cb/0x290 fs/fat/cache.c:375
 __fat_get_block fs/fat/inode.c:129 [inline]
 fat_get_block+0xa2/0x5a0 fs/fat/inode.c:190
 block_read_full_page+0x297/0x870 fs/buffer.c:2284
 do_mpage_readpage+0xe26/0x10b0 fs/mpage.c:332
 mpage_readpage+0x57/0xd0 fs/mpage.c:408
 fat_readpage+0x18/0x20 fs/fat/inode.c:210
 filemap_read_page+0x69/0x200 mm/filemap.c:2326
 filemap_update_page mm/filemap.c:2394 [inline]
 filemap_get_pages mm/filemap.c:2490 [inline]
 filemap_read+0xc52/0x1220 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 call_read_iter include/linux/fs.h:2108 [inline]
 generic_file_splice_read+0x22a/0x310 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 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: 0x00000000000ee000 -> 0x00000000000eee00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22677 Comm: syz-executor.5 Not tainted 5.14.0-rc7-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/08/24 00:28 upstream d5ae8d7f85b7 b599f2fc .config log report info KCSAN: data-race in fat_bmap / generic_write_end
ci2-upstream-kcsan-gce 2021/08/01 20:08 upstream d4affd6b6e81 6c236867 .config log report info KCSAN: data-race in fat_bmap / generic_write_end
* Struck through repros no longer work on HEAD.