syzbot


KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete (4)

Status: auto-closed as invalid on 2021/06/16 07:05
Subsystems: fs mm
[Documentation on labels]
First crash: 1125d, last: 1070d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete (3) ext4 6 1182d 1226d 0/26 auto-closed as invalid on 2021/02/24 09:14
upstream KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete (2) fs mm 2 1271d 1304d 0/26 auto-closed as invalid on 2020/11/27 11:56
upstream KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete (6) fs mm 1 914d 914d 0/26 auto-closed as invalid on 2021/11/19 12:34
upstream KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete ext4 3 1440d 1489d 0/26 auto-closed as invalid on 2020/06/18 14:14
upstream KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete (5) fs mm 1 994d 994d 0/26 auto-closed as invalid on 2021/09/03 02:27

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

write to 0xffff888105de9480 of 8 bytes by task 6111 on cpu 1:
 __add_to_page_cache_locked+0x256/0x4e0 mm/filemap.c:914
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:967
 page_cache_ra_unbounded+0x262/0x410 mm/readahead.c:221
 ondemand_readahead+0x579/0x7b0 mm/readahead.c:267
 page_cache_async_ra+0x165/0x190 mm/readahead.c:607
 page_cache_async_readahead include/linux/pagemap.h:902 [inline]
 filemap_readahead mm/filemap.c:2442 [inline]
 filemap_get_pages mm/filemap.c:2483 [inline]
 filemap_read+0x49d/0x1230 mm/filemap.c:2550
 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_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888105de9480 of 8 bytes by task 6102 on cpu 0:
 iomap_dio_complete+0x31a/0x3c0 fs/iomap/direct-io.c:112
 iomap_dio_rw+0x4e/0x70 fs/iomap/direct-io.c:652
 ext4_dio_write_iter fs/ext4/file.c:568 [inline]
 ext4_file_write_iter+0xa4f/0x11d0 fs/ext4/file.c:678
 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_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6102 Comm: syz-executor.2 Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Page cache invalidation failure on direct I/O.  Possible data corruption due to collision with buffered I/O!
File: /root/syzkaller-testdir801259789/syzkaller.iwxvrB/57/bus PID: 6102 Comm: syz-executor.2

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/05/12 06:57 upstream 88b06399c9c7 86294427 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/04/12 11:11 upstream d434405aaab7 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/04/07 21:16 upstream 3a22981230f9 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/04/02 07:27 upstream 1678e493d530 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/04/01 18:20 upstream ffd9fb546d49 6a81331a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/03/20 12:48 upstream 1c273e10bc0c e45f5621 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
2021/03/18 01:46 upstream 6417f03132a6 fdb2bb2c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __add_to_page_cache_locked / iomap_dio_complete
* Struck through repros no longer work on HEAD.