syzbot


KCSAN: data-race in page_cache_async_ra / page_cache_async_ra

Status: upstream: reported on 2024/12/30 19:55
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+76b1159c512497311db6@syzkaller.appspotmail.com
First crash: 5d12h, last: 5d12h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] [mm?] KCSAN: data-race in page_cache_async_ra / page_cache_async_ra 0 (1) 2024/12/30 19:55

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

read to 0xffff888104c41698 of 8 bytes by task 14613 on cpu 0:
 page_cache_async_ra+0x193/0x420 mm/readahead.c:645
 do_async_mmap_readahead mm/filemap.c:3231 [inline]
 filemap_fault+0x2d1/0xb30 mm/filemap.c:3330
 __do_fault+0xb6/0x200 mm/memory.c:4907
 do_read_fault mm/memory.c:5322 [inline]
 do_fault mm/memory.c:5456 [inline]
 do_pte_missing mm/memory.c:3979 [inline]
 handle_pte_fault mm/memory.c:5801 [inline]
 __handle_mm_fault mm/memory.c:5944 [inline]
 handle_mm_fault+0xe98/0x2ac0 mm/memory.c:6112
 faultin_page mm/gup.c:1196 [inline]
 __get_user_pages+0xf2c/0x2670 mm/gup.c:1494
 populate_vma_page_range mm/gup.c:1932 [inline]
 __mm_populate+0x25b/0x3b0 mm/gup.c:2035
 mm_populate include/linux/mm.h:3396 [inline]
 __do_sys_mlockall mm/mlock.c:769 [inline]
 __se_sys_mlockall+0x2c5/0x370 mm/mlock.c:745
 __x64_sys_mlockall+0x1f/0x30 mm/mlock.c:745
 x64_sys_call+0x2bf8/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:152
 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 0xffff888104c41698 of 8 bytes by task 14560 on cpu 1:
 page_cache_async_ra+0x2b7/0x420 mm/readahead.c:667
 do_async_mmap_readahead mm/filemap.c:3231 [inline]
 filemap_fault+0x2d1/0xb30 mm/filemap.c:3330
 __do_fault+0xb6/0x200 mm/memory.c:4907
 do_read_fault mm/memory.c:5322 [inline]
 do_fault mm/memory.c:5456 [inline]
 do_pte_missing mm/memory.c:3979 [inline]
 handle_pte_fault mm/memory.c:5801 [inline]
 __handle_mm_fault mm/memory.c:5944 [inline]
 handle_mm_fault+0xe98/0x2ac0 mm/memory.c:6112
 faultin_page mm/gup.c:1196 [inline]
 __get_user_pages+0xf2c/0x2670 mm/gup.c:1494
 __get_user_pages_locked mm/gup.c:1760 [inline]
 get_dump_page+0xb8/0x1b0 mm/gup.c:2278
 dump_user_range+0xc6/0x550 fs/coredump.c:943
 elf_core_dump+0x1bdc/0x1ce0 fs/binfmt_elf.c:2129
 do_coredump+0x1898/0x1f40 fs/coredump.c:758
 get_signal+0xd4f/0x1000 kernel/signal.c:3002
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 irqentry_exit_to_user_mode+0xa7/0x120 kernel/entry/common.c:231
 irqentry_exit+0x12/0x50 kernel/entry/common.c:334
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x000000000000056a -> 0x000000000000058a

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

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/30 11:54 upstream fc033cf25e61 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in page_cache_async_ra / page_cache_async_ra
* Struck through repros no longer work on HEAD.