syzbot


KCSAN: data-race in filemap_fault / generic_write_end (5)

Status: auto-closed as invalid on 2021/09/23 14:23
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 441d, last: 406d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in filemap_fault / generic_write_end (3) 2 740d 741d 0/24 auto-closed as invalid on 2020/10/24 13:06
upstream KCSAN: data-race in filemap_fault / generic_write_end (4) 3 483d 567d 0/24 auto-closed as invalid on 2021/07/08 19:40
upstream KCSAN: data-race in filemap_fault / generic_write_end (6) 43 129d 234d 0/24 auto-closed as invalid on 2022/06/28 10:53
upstream KCSAN: data-race in filemap_fault / generic_write_end (2) 1 799d 799d 0/24 auto-closed as invalid on 2020/08/26 18:57
upstream KCSAN: data-race in filemap_fault / generic_write_end 1 971d 910d 0/24 auto-closed as invalid on 2020/04/17 11:16

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

write to 0xffff888106a143d0 of 8 bytes by task 5721 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 generic_write_end+0x96/0x180 fs/buffer.c:2182
 ext4_da_write_end+0x59b/0x730 fs/ext4/inode.c:3110
 generic_perform_write+0x22a/0x3c0 mm/filemap.c:3667
 ext4_buffered_write_iter+0x2f2/0x3f0 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
 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 0xffff888106a143d0 of 8 bytes by task 5727 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 filemap_fault+0x8a/0x7b0 mm/filemap.c:2971
 ext4_filemap_fault+0x4b/0x60 fs/ext4/inode.c:6194
 __do_fault mm/memory.c:3857 [inline]
 do_shared_fault mm/memory.c:4226 [inline]
 do_fault mm/memory.c:4304 [inline]
 handle_pte_fault mm/memory.c:4558 [inline]
 __handle_mm_fault mm/memory.c:4693 [inline]
 handle_mm_fault+0xf56/0x1a50 mm/memory.c:4791
 do_user_addr_fault+0x609/0xbe0 arch/x86/mm/fault.c:1390
 handle_page_fault arch/x86/mm/fault.c:1475 [inline]
 exc_page_fault+0x91/0x220 arch/x86/mm/fault.c:1531
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
 copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:205
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 copyout lib/iov_iter.c:157 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:228 [inline]
 __copy_page_to_iter lib/iov_iter.c:801 [inline]
 copy_page_to_iter+0x2ef/0x940 lib/iov_iter.c:829
 filemap_read+0xef6/0x1220 mm/filemap.c:2605
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 ext4_file_read_iter+0x1db/0x290 fs/ext4/file.c:73
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 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: 0x0000000000157000 -> 0x0000000000157a00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5727 Comm: syz-executor.3 Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/08/19 14:15 upstream d6d09a694205 e2da378b .config log report info KCSAN: data-race in filemap_fault / generic_write_end
ci2-upstream-kcsan-gce 2021/07/16 22:24 upstream 0d18c12b288a f115ae98 .config log report info KCSAN: data-race in filemap_fault / generic_write_end
ci2-upstream-kcsan-gce 2021/07/15 15:41 upstream 8096acd7442e f115ae98 .config log report info KCSAN: data-race in filemap_fault / generic_write_end
* Struck through repros no longer work on HEAD.