syzbot


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

Status: auto-obsoleted due to no activity on 2023/07/24 21:47
Subsystems: exfat mm
[Documentation on labels]
First crash: 550d, last: 535d
Similar bugs (7)
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 (8) mm 1 23d 23d 0/28 moderation: reported on 2024/11/13 01:46
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (6) mm 4 140d 185d 0/28 auto-obsoleted due to no activity on 2024/08/23 03:22
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (4) mm 2 352d 360d 0/28 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 420d 482d 0/28 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 (7) exfat 1 100d 100d 0/28 auto-obsoleted due to no activity on 2024/10/02 07:50
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range fs mm 7 704d 778d 0/28 auto-obsoleted due to no activity on 2023/02/28 04:15
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (5) mm 4 269d 298d 0/28 auto-obsoleted due to no activity on 2024/04/16 09:26

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

read-write to 0xffff888166fc6890 of 8 bytes by task 32508 on cpu 0:
 page_cache_delete mm/filemap.c:147 [inline]
 __filemap_remove_folio+0x224/0x320 mm/filemap.c:225
 invalidate_complete_folio2 mm/truncate.c:587 [inline]
 invalidate_inode_pages2_range+0x506/0x790 mm/truncate.c:674
 generic_file_direct_write+0x208/0x400 mm/filemap.c:3841
 __generic_file_write_iter+0x122/0x290 mm/filemap.c:4013
 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4089
 do_iter_write+0x4ae/0x770 fs/read_write.c:860
 vfs_iter_write+0x50/0x70 fs/read_write.c:901
 iter_file_splice_write+0x456/0x7d0 fs/splice.c:795
 do_splice_from fs/splice.c:873 [inline]
 direct_splice_actor+0x84/0xa0 fs/splice.c:1039
 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:994
 do_splice_direct+0x104/0x180 fs/splice.c:1082
 do_sendfile+0x3b8/0x950 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

read to 0xffff888166fc6890 of 8 bytes by task 32490 on cpu 1:
 mapping_needs_writeback mm/filemap.c:628 [inline]
 file_write_and_wait_range+0x6a/0x190 mm/filemap.c:780
 __generic_file_fsync+0x4c/0x140 fs/libfs.c:1127
 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x10b/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2469 [inline]
 generic_file_write_iter+0x191/0x1c0 mm/filemap.c:4093
 do_iter_write+0x4ae/0x770 fs/read_write.c:860
 vfs_iter_write+0x50/0x70 fs/read_write.c:901
 iter_file_splice_write+0x456/0x7d0 fs/splice.c:795
 do_splice_from fs/splice.c:873 [inline]
 direct_splice_actor+0x84/0xa0 fs/splice.c:1039
 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:994
 do_splice_direct+0x104/0x180 fs/splice.c:1082
 do_sendfile+0x3b8/0x950 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: 0x0000000000000254 -> 0x0000000000000245

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 32490 Comm: syz-executor.4 Not tainted 6.4.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/19 21:46 upstream 45a3e24f65e9 d521bc56 .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
2023/06/18 22:00 upstream 8c1f0c38b310 f3921d4d .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
2023/06/17 14:50 upstream 1639fae5132b f3921d4d .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
2023/06/05 06:14 upstream 9561de3a55be a4ae4f42 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range
* Struck through repros no longer work on HEAD.