syzbot


KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write

Status: auto-obsoleted due to no activity on 2023/11/01 22:02
Subsystems: fs mm
[Documentation on labels]
First crash: 255d, last: 209d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write (2) fs mm 4 126d 136d 0/26 auto-obsoleted due to no activity on 2024/01/23 17:15
upstream KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write (3) fs mm 3 58d 74d 0/26 auto-obsoleted due to no activity on 2024/03/31 09:05

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write

read-write to 0xffff888106782c08 of 8 bytes by task 5645 on cpu 0:
 __filemap_add_folio+0x3c3/0x750 mm/filemap.c:904
 filemap_add_folio+0x70/0x160 mm/filemap.c:939
 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order mm/readahead.c:546 [inline]
 ondemand_readahead+0x524/0x690 mm/readahead.c:668
 page_cache_async_ra+0x94/0xa0 mm/readahead.c:717
 do_async_mmap_readahead mm/filemap.c:3227 [inline]
 filemap_fault+0x3a0/0xbf0 mm/filemap.c:3281
 __do_fault mm/memory.c:4204 [inline]
 do_read_fault mm/memory.c:4568 [inline]
 do_fault mm/memory.c:4705 [inline]
 do_pte_missing mm/memory.c:3669 [inline]
 handle_pte_fault mm/memory.c:4978 [inline]
 __handle_mm_fault mm/memory.c:5119 [inline]
 handle_mm_fault+0x15e2/0x2cc0 mm/memory.c:5284
 faultin_page mm/gup.c:956 [inline]
 __get_user_pages+0x402/0xe40 mm/gup.c:1239
 populate_vma_page_range mm/gup.c:1666 [inline]
 __mm_populate+0x216/0x330 mm/gup.c:1775
 mm_populate include/linux/mm.h:3305 [inline]
 vm_mmap_pgoff+0x1a7/0x240 mm/util.c:551
 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1400
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888106782c08 of 8 bytes by task 5623 on cpu 1:
 kiocb_invalidate_post_direct_write+0x5e/0x1b0 mm/filemap.c:3869
 iomap_dio_complete+0x334/0x4c0 fs/iomap/direct-io.c:114
 iomap_dio_rw+0x62/0x90 fs/iomap/direct-io.c:752
 ext4_dio_write_iter fs/ext4/file.c:605 [inline]
 ext4_file_write_iter+0xaaa/0x1200 fs/ext4/file.c:715
 do_iter_write+0x4b4/0x7b0 fs/read_write.c:860
 vfs_iter_write+0x56/0x70 fs/read_write.c:901
 iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
 do_splice_from fs/splice.c:933 [inline]
 direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
 do_splice_direct+0x10d/0x190 fs/splice.c:1194
 do_sendfile+0x3b6/0x9a0 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64 fs/read_write.c:1308 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000000000004e7 -> 0x00000000000004e9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 5623 Comm: syz-executor.3 Not tainted 6.6.0-rc3-syzkaller-00038-g0e945134b680 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/27 21:57 upstream 0e945134b680 2895a507 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/29 18:06 upstream 1c59d383390f ce731e62 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/25 12:00 upstream 4f9e7fabf864 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/18 11:00 upstream 0e8860d2125f acb1ba71 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/16 20:22 upstream 4853c74bd7ab 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/15 07:22 upstream 91aa6c412d7f 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
2023/08/12 18:13 upstream f8de32cc060b 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / kiocb_invalidate_post_direct_write
* Struck through repros no longer work on HEAD.