syzbot


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

Status: auto-obsoleted due to no activity on 2024/07/21 21:55
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+5cba2f11c9c99940ec99@syzkaller.appspotmail.com
First crash: 256d, last: 140d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range mm 90 561d 1090d 0/28 auto-obsoleted due to no activity on 2023/05/27 02:10
upstream KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range (6) fs mm 1 40d 40d 0/28 auto-obsoleted due to no activity on 2024/10/29 01:04
upstream KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range (3) mm 4 341d 329d 0/28 auto-obsoleted due to no activity on 2024/01/02 05:06
upstream KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range (4) fs mm 2 301d 299d 0/28 auto-obsoleted due to no activity on 2024/02/11 21:27
upstream KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range (2) ext4 4 429d 440d 0/28 auto-obsoleted due to no activity on 2023/10/06 06:01

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

read-write to 0xffff888107916778 of 8 bytes by task 11449 on cpu 1:
 __filemap_add_folio+0x439/0x710 mm/filemap.c:918
 filemap_add_folio+0x9c/0x1b0 mm/filemap.c:970
 page_cache_ra_unbounded+0x148/0x2e0 mm/readahead.c:252
 do_page_cache_ra mm/readahead.c:303 [inline]
 page_cache_ra_order mm/readahead.c:547 [inline]
 ondemand_readahead+0x542/0x6b0 mm/readahead.c:669
 page_cache_async_ra+0x94/0xa0 mm/readahead.c:718
 filemap_readahead mm/filemap.c:2504 [inline]
 filemap_get_pages+0x398/0xfb0 mm/filemap.c:2545
 filemap_splice_read+0x360/0x920 mm/filemap.c:2894
 ext4_file_splice_read+0x95/0xc0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x26c/0x670 fs/splice.c:1089
 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
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888107916778 of 8 bytes by task 11444 on cpu 0:
 mapping_needs_writeback mm/filemap.c:635 [inline]
 file_write_and_wait_range+0x6d/0x170 mm/filemap.c:787
 ext4_sync_file+0x134/0x6c0 fs/ext4/fsync.c:158
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2794 [inline]
 ext4_buffered_write_iter+0x338/0x380 fs/ext4/file.c:305
 ext4_file_write_iter+0x29f/0xe30
 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
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000038 -> 0x0000000000000040

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11444 Comm: syz-executor.2 Not tainted 6.10.0-rc3-syzkaller-00249-gb5beaa44747b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/16 21:55 upstream b5beaa44747b f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/06/12 19:56 upstream cea2a26553ac f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/06/11 12:09 upstream 83a7eefedc9b b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/06/06 18:43 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/06/05 18:13 upstream 71d7b52cc33b 5aa1a7c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/05/04 13:43 upstream ddb4c3f25b7b 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/04/19 21:52 upstream 3cdb45594619 af24b050 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/03/28 08:19 upstream 8d025e2092e2 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/03/11 13:37 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/03/08 16:35 upstream 3aaa8ce7a335 8e75c913 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/02/23 08:53 upstream ffd2cb6b718e 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
2024/02/21 10:42 upstream 9fc1ccccfd8d 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / file_write_and_wait_range
* Struck through repros no longer work on HEAD.