syzbot


KCSAN: data-race in getrusage / try_to_migrate_one (3)

Status: moderation: reported on 2025/09/07 23:18
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+868c00f2248bb08674fe@syzkaller.appspotmail.com
First crash: 4d10h, last: 4d10h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in getrusage / try_to_migrate_one mm 6 8 199d 212d 0/29 auto-obsoleted due to no activity on 2025/04/22 03:28
upstream KCSAN: data-race in getrusage / try_to_migrate_one (2) mm 6 1 114d 114d 0/29 auto-obsoleted due to no activity on 2025/07/16 05:50

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

write to 0xffff8881036bdd58 of 8 bytes by task 4193 on cpu 1:
 update_hiwater_rss include/linux/mm.h:2657 [inline]
 try_to_migrate_one+0x918/0x16e0 mm/rmap.c:2455
 rmap_walk_anon+0x27d/0x430 mm/rmap.c:2842
 rmap_walk mm/rmap.c:2947 [inline]
 try_to_migrate+0x12a/0x210 mm/rmap.c:2621
 migrate_folio_unmap mm/migrate.c:1324 [inline]
 migrate_pages_batch+0x6e1/0x1ae0 mm/migrate.c:1873
 migrate_pages_sync mm/migrate.c:1996 [inline]
 migrate_pages+0xf5f/0x1770 mm/migrate.c:2105
 do_mbind mm/mempolicy.c:1539 [inline]
 kernel_mbind mm/mempolicy.c:1682 [inline]
 __do_sys_mbind mm/mempolicy.c:1756 [inline]
 __se_sys_mbind+0x975/0xac0 mm/mempolicy.c:1752
 __x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1752
 x64_sys_call+0x2932/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:238
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881036bdd58 of 8 bytes by task 4194 on cpu 0:
 get_mm_hiwater_rss include/linux/mm.h:2644 [inline]
 setmax_mm_hiwater_rss include/linux/mm.h:2674 [inline]
 getrusage+0xa52/0xbb0 kernel/sys.c:1906
 io_sq_thread+0x5dd/0x1190 io_uring/sqpoll.c:320
 ret_from_fork+0xda/0x150 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x00000000000014fd -> 0x00000000000016c7

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4194 Comm: iou-sqp-4193 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/07 23:18 upstream 6ab41fca2e80 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in getrusage / try_to_migrate_one
* Struck through repros no longer work on HEAD.