syzbot


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

Status: auto-obsoleted due to no activity on 2024/10/02 07:50
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+3d5acb6ec6e87236bb21@syzkaller.appspotmail.com
First crash: 115d, last: 115d
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 39d 39d 0/28 moderation: reported on 2024/11/13 01:46
upstream KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (2) exfat mm 4 551d 566d 0/28 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 4 156d 201d 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 368d 376d 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 436d 498d 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 fs mm 7 720d 794d 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 284d 313d 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 0xffff888113985760 of 8 bytes by task 11880 on cpu 0:
 page_cache_delete mm/filemap.c:154 [inline]
 __filemap_remove_folio+0x1c5/0x2c0 mm/filemap.c:232
 invalidate_complete_folio2 mm/truncate.c:564 [inline]
 invalidate_inode_pages2_range+0x431/0x720 mm/truncate.c:653
 kiocb_invalidate_pages+0x1b1/0x1e0 mm/filemap.c:2738
 generic_file_direct_write+0x58/0x200 mm/filemap.c:3934
 __generic_file_write_iter+0xae/0x120 mm/filemap.c:4107
 generic_file_write_iter+0x7d/0x1d0 mm/filemap.c:4147
 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/0x950 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+0xed5/0x2d60 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
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888113985760 of 8 bytes by task 11886 on cpu 1:
 mapping_needs_writeback mm/filemap.c:635 [inline]
 file_write_and_wait_range+0x6d/0x170 mm/filemap.c:787
 __generic_file_fsync+0x4c/0x140 fs/libfs.c:1529
 fat_file_fsync+0x4c/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2821 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4151
 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/0x950 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+0xed5/0x2d60 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
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000008 -> 0x0000000000000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 11886 Comm: syz.0.1803 Not tainted 6.11.0-rc5-syzkaller-00050-g3ec3f5fc4a91 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/28 07:49 upstream 3ec3f5fc4a91 6c853ff9 .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.