syzbot


KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write (3)

Status: auto-closed as invalid on 2021/10/16 20:07
Subsystems: fs mm
[Documentation on labels]
First crash: 987d, last: 957d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write fs mm 1 1360d 1360d 0/26 auto-closed as invalid on 2020/09/08 11:28
upstream KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write (2) fs 4 1317d 1322d 0/26 auto-closed as invalid on 2020/10/21 16:12

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write

write to 0xffff888105f9bc10 of 8 bytes by task 31219 on cpu 0:
 __add_to_page_cache_locked+0x276/0x4f0 mm/filemap.c:931
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:984
 page_cache_ra_unbounded+0x274/0x430 mm/readahead.c:222
 ondemand_readahead+0x58c/0x7c0
 page_cache_sync_ra+0xaf/0xe0 mm/readahead.c:580
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3dd/0x1240 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 call_read_iter include/linux/fs.h:2157 [inline]
 generic_file_splice_read+0x252/0x340 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

read to 0xffff888105f9bc10 of 8 bytes by task 31241 on cpu 1:
 generic_file_direct_write+0x29a/0x410 mm/filemap.c:3691
 __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

value changed: 0x0000000000000045 -> 0x0000000000000046

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

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/11 20:07 upstream 926de8c4326c 3ce60af8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write
2021/08/21 00:08 upstream d992fe5318d8 b599f2fc .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write
2021/08/12 07:41 upstream 1746f4db5135 6972b106 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / generic_file_direct_write
* Struck through repros no longer work on HEAD.