syzbot


KCSAN: data-race in page_cache_sync_ra / read_pages

Status: moderation: reported on 2024/08/12 03:14
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+3b0710ccae01f96a23b3@syzkaller.appspotmail.com
First crash: 31d, last: 31d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in page_cache_sync_ra / read_pages

read-write to 0xffff888116028f80 of 4 bytes by task 16187 on cpu 0:
 read_pages+0x23f/0x540 mm/readahead.c:170
 page_cache_ra_unbounded+0x285/0x2e0 mm/readahead.c:273
 page_cache_sync_ra+0x652/0x670
 page_cache_sync_readahead include/linux/pagemap.h:1296 [inline]
 filemap_get_pages+0x252/0xfb0 mm/filemap.c:2529
 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/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

write to 0xffff888116028f80 of 4 bytes by task 16195 on cpu 1:
 page_cache_sync_ra+0x511/0x670 mm/readahead.c:543
 page_cache_sync_readahead include/linux/pagemap.h:1296 [inline]
 filemap_get_pages+0x252/0xfb0 mm/filemap.c:2529
 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/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: 0x00000019 -> 0x0000001d

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 16195 Comm: syz.0.3605 Not tainted 6.11.0-rc2-syzkaller-00315-g7006fe2f7f78 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/12 03:13 upstream 7006fe2f7f78 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in page_cache_sync_ra / read_pages
* Struck through repros no longer work on HEAD.