syzbot


KCSAN: data-race in read_pages / read_pages (4)

Status: upstream: reported on 2024/12/26 21:44
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+e1d2475cbd1f0c63692f@syzkaller.appspotmail.com
First crash: 51d, last: 45d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] [mm?] KCSAN: data-race in read_pages / read_pages (4) 0 (1) 2024/12/26 21:44
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in read_pages / read_pages (2) fs mm 134 340d 436d 0/28 auto-obsoleted due to no activity on 2024/04/14 15:35
upstream KCSAN: data-race in read_pages / read_pages (3) fs mm 1 158d 158d 0/28 auto-obsoleted due to no activity on 2024/10/15 11:15
upstream KCSAN: data-race in read_pages / read_pages fs mm 1 966d 966d 0/28 auto-closed as invalid on 2022/07/30 19:54

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

write to 0xffff888116289224 of 4 bytes by task 4574 on cpu 1:
 read_pages+0x287/0x540 mm/readahead.c:172
 page_cache_ra_unbounded+0x266/0x310
 page_cache_sync_ra+0x652/0x670
 page_cache_sync_readahead include/linux/pagemap.h:1397 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2546
 filemap_splice_read+0x358/0x910 mm/filemap.c:2922
 ext4_file_splice_read+0x8f/0xb0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x269/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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 0xffff888116289224 of 4 bytes by task 4575 on cpu 0:
 read_pages+0x25c/0x540 mm/readahead.c:171
 page_cache_ra_unbounded+0x266/0x310
 page_cache_sync_ra+0x652/0x670
 page_cache_sync_readahead include/linux/pagemap.h:1397 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2546
 filemap_splice_read+0x358/0x910 mm/filemap.c:2922
 ext4_file_splice_read+0x8f/0xb0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x269/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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: 0x0000000a -> 0x00000005

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4575 Comm: syz.1.320 Not tainted 6.13.0-rc5-syzkaller-00004-gccb98ccef0e5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
==================================================================
BUG: KCSAN: data-race in read_pages / read_pages

read-write to 0xffff888116289220 of 4 bytes by task 4574 on cpu 0:
 read_pages+0x23f/0x540 mm/readahead.c:170
 page_cache_ra_unbounded+0x2b8/0x310 mm/readahead.c:295
 page_cache_sync_ra+0x652/0x670
 page_cache_sync_readahead include/linux/pagemap.h:1397 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2546
 filemap_splice_read+0x358/0x910 mm/filemap.c:2922
 ext4_file_splice_read+0x8f/0xb0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x269/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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-write to 0xffff888116289220 of 4 bytes by task 4575 on cpu 1:
 read_pages+0x23f/0x540 mm/readahead.c:170
 page_cache_ra_unbounded+0x266/0x310
 page_cache_sync_ra+0x652/0x670
 page_cache_sync_readahead include/linux/pagemap.h:1397 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2546
 filemap_splice_read+0x358/0x910 mm/filemap.c:2922
 ext4_file_splice_read+0x8f/0xb0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x269/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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: 0x00000010 -> 0x0000000c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4575 Comm: syz.1.320 Not tainted 6.13.0-rc5-syzkaller-00004-gccb98ccef0e5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/01 03:01 upstream ccb98ccef0e5 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in read_pages / read_pages
2024/12/26 20:56 upstream 9b2ffa6148b1 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in read_pages / read_pages
* Struck through repros no longer work on HEAD.