syzbot


KCSAN: data-race in __filemap_remove_folio / kiocb_invalidate_post_direct_write

Status: moderation: reported on 2024/05/17 18:16
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+e8616ca5a8d283d94778@syzkaller.appspotmail.com
First crash: 28d, last: 20d

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

read-write to 0xffff888107db7528 of 8 bytes by task 10578 on cpu 0:
 page_cache_delete mm/filemap.c:154 [inline]
 __filemap_remove_folio+0x1c5/0x2c0 mm/filemap.c:232
 __remove_mapping+0x341/0x470 mm/vmscan.c:762
 remove_mapping+0x22/0x90 mm/vmscan.c:795
 mapping_evict_folio mm/truncate.c:293 [inline]
 mapping_try_invalidate+0x288/0x3e0 mm/truncate.c:511
 invalidate_mapping_pages+0x27/0x40 mm/truncate.c:549
 ext4_dio_write_iter fs/ext4/file.c:619 [inline]
 ext4_file_write_iter+0xdca/0xe30 fs/ext4/file.c:696
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/0x960 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 x64_sys_call+0x2c9f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/25 21:25 upstream 56fb6f92854f a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / kiocb_invalidate_post_direct_write
2024/05/17 18:15 upstream ea5f6ad9ad96 a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / kiocb_invalidate_post_direct_write
* Struck through repros no longer work on HEAD.