syzbot


KCSAN: data-race in getrusage / zap_page_range_single

Status: moderation: reported on 2025/03/25 08:44
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+e47c1ad6a08dcb25ccd1@syzkaller.appspotmail.com
First crash: 13h02m, last: 13h01m

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

write to 0xffff88810854c878 of 8 bytes by task 5228 on cpu 1:
 update_hiwater_rss include/linux/mm.h:2675 [inline]
 zap_page_range_single+0x1a0/0x2f0 mm/memory.c:2022
 unmap_mapping_range_vma mm/memory.c:3846 [inline]
 unmap_mapping_range_tree mm/memory.c:3863 [inline]
 unmap_mapping_pages mm/memory.c:3929 [inline]
 unmap_mapping_range+0x15c/0x1a0 mm/memory.c:3966
 shmem_fallocate+0x278/0x860 mm/shmem.c:3695
 vfs_fallocate+0x368/0x3b0 fs/open.c:338
 madvise_remove mm/madvise.c:1034 [inline]
 madvise_vma_behavior mm/madvise.c:1269 [inline]
 madvise_walk_vmas mm/madvise.c:1511 [inline]
 do_madvise+0x14dd/0x2ad0 mm/madvise.c:1698
 __do_sys_madvise mm/madvise.c:1714 [inline]
 __se_sys_madvise mm/madvise.c:1712 [inline]
 __x64_sys_madvise+0x61/0x70 mm/madvise.c:1712
 x64_sys_call+0x23b8/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:29
 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 0xffff88810854c878 of 8 bytes by task 5216 on cpu 0:
 get_mm_hiwater_rss include/linux/mm.h:2662 [inline]
 setmax_mm_hiwater_rss include/linux/mm.h:2692 [inline]
 getrusage+0xa15/0xb70 kernel/sys.c:1876
 io_sq_thread+0x5de/0x10e0 io_uring/sqpoll.c:310
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x0000000000001710 -> 0x0000000000002230

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5216 Comm: iou-sqp-5215 Not tainted 6.14.0-syzkaller-00685-g3ba7dfb8da62 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/25 08:44 upstream 3ba7dfb8da62 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in getrusage / zap_page_range_single
2025/03/25 08:43 upstream 3ba7dfb8da62 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in getrusage / zap_page_range_single
* Struck through repros no longer work on HEAD.