syzbot


KCSAN: data-race in generic_file_direct_write / generic_file_read_iter (2)

Status: auto-closed as invalid on 2021/11/26 22:19
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 401d, last: 401d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_file_direct_write / generic_file_read_iter 1 814d 814d 0/24 auto-closed as invalid on 2020/10/10 12:50
upstream KCSAN: data-race in generic_file_direct_write / generic_file_read_iter (3) 1 151d 151d 0/24 auto-closed as invalid on 2022/08/04 11:14

Sample crash report:
R10: 00000000ffffff04 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd7663f39f R14: 00007fe540725300 R15: 0000000000022000
==================================================================
BUG: KCSAN: data-race in generic_file_direct_write / generic_file_read_iter

write to 0xffff888104a02438 of 8 bytes by task 16593 on cpu 1:
 i_size_write include/linux/fs.h:916 [inline]
 generic_file_direct_write+0x3a1/0x410 mm/filemap.c:3699
 __generic_file_write_iter+0x1bc/0x310 mm/filemap.c:3854
 generic_file_write_iter+0x75/0x130 mm/filemap.c:3929
 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 0xffff888104a02438 of 8 bytes by task 16794 on cpu 0:
 i_size_read include/linux/fs.h:894 [inline]
 generic_file_read_iter+0xd1/0x2c0 mm/filemap.c:2742
 call_read_iter include/linux/fs.h:2157 [inline]
 generic_file_splice_read+0x24f/0x330 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+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

value changed: 0x000000000001ee00 -> 0x000000000001f000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16794 Comm: syz-executor.3 Not tainted 5.15.0-rc6-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 Title
ci2-upstream-kcsan-gce 2021/10/22 22:17 upstream 64222515138e 282f03fb .config log report info KCSAN: data-race in generic_file_direct_write / generic_file_read_iter
* Struck through repros no longer work on HEAD.