syzbot


KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (5)

Status: auto-obsoleted due to no activity on 2024/04/16 09:26
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+1e7220e624c9df7fd0c2@syzkaller.appspotmail.com
First crash: 163d, last: 134d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (2) exfat mm 4 401d 415d 0/27 auto-obsoleted due to no activity on 2023/07/24 21:47
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (6) mm iomap 4 5d19h 50d 0/27 moderation: reported on 2024/06/04 01:36
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (4) mm 2 218d 225d 0/27 auto-obsoleted due to no activity on 2024/01/23 22:45
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (3) mm 5 285d 347d 0/27 auto-obsoleted due to no activity on 2023/11/17 05:22
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range fs mm 7 569d 643d 0/27 auto-obsoleted due to no activity on 2023/02/28 04:15

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

read-write to 0xffff888106635538 of 8 bytes by task 24721 on cpu 1:
 page_cache_delete mm/filemap.c:145 [inline]
 __filemap_remove_folio+0x1d1/0x2d0 mm/filemap.c:223
 __remove_mapping+0x341/0x460 mm/vmscan.c:756
 remove_mapping+0x22/0x90 mm/vmscan.c:789
 mapping_evict_folio mm/truncate.c:293 [inline]
 mapping_try_invalidate+0x27d/0x3d0 mm/truncate.c:511
 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:549
 ext4_dio_write_iter fs/ext4/file.c:619 [inline]
 ext4_file_write_iter+0xdc6/0xe30 fs/ext4/file.c:696
 call_write_iter include/linux/fs.h:2108 [inline]
 iter_file_splice_write+0x5de/0x950 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x660 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/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
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888106635538 of 8 bytes by task 24710 on cpu 0:
 mapping_needs_writeback mm/filemap.c:626 [inline]
 file_write_and_wait_range+0x67/0x190 mm/filemap.c:778
 ext4_sync_file+0x133/0x6c0 fs/ext4/fsync.c:158
 vfs_fsync_range+0x111/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2793 [inline]
 ext4_buffered_write_iter+0x334/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x29f/0xe30
 call_write_iter include/linux/fs.h:2108 [inline]
 iter_file_splice_write+0x5de/0x950 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x660 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/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
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000000003d -> 0x0000000000000033

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24710 Comm: syz-executor.1 Not tainted 6.8.0-syzkaller-00711-g045395d86acd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/12 09:25 upstream 045395d86acd 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
2024/02/19 12:18 upstream b401b621758e 96e91f57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
2024/02/18 02:18 upstream ced590523156 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
2024/02/12 08:22 upstream 841c35169323 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
* Struck through repros no longer work on HEAD.