syzbot


KCSAN: data-race in compact_zone / compact_zone (8)

Status: moderation: reported on 2025/09/23 23:39
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+8dfb8f977e86270cee03@syzkaller.appspotmail.com
First crash: 8d13h, last: 8d13h
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in compact_zone / compact_zone (6) mm 6 2 645d 665d 0/29 auto-obsoleted due to no activity on 2024/01/30 17:49
upstream KCSAN: data-race in compact_zone / compact_zone (7) mm 6 1 270d 270d 0/29 auto-obsoleted due to no activity on 2025/03/02 10:41
upstream KCSAN: data-race in compact_zone / compact_zone (3) mm 6 2 1796d 1823d 0/29 auto-closed as invalid on 2020/12/05 18:21
upstream KCSAN: data-race in compact_zone / compact_zone mm 6 3 1976d 1987d 0/29 auto-closed as invalid on 2020/06/18 13:23
upstream KCSAN: data-race in compact_zone / compact_zone (5) mm 6 58 1450d 1480d 0/29 auto-closed as invalid on 2021/11/17 00:44
upstream KCSAN: data-race in compact_zone / compact_zone (2) mm 6 1 1901d 1901d 0/29 auto-closed as invalid on 2020/08/23 00:57
upstream KCSAN: data-race in compact_zone / compact_zone (4) mm 6 4 1697d 1717d 0/29 auto-closed as invalid on 2021/03/15 05:37

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

write to 0xffff88823fffacd8 of 8 bytes by task 3588 on cpu 1:
 update_cached_migrate mm/compaction.c:449 [inline]
 isolate_migratepages mm/compaction.c:2126 [inline]
 compact_zone+0x13cb/0x2900 mm/compaction.c:2617
 compact_zone_order mm/compaction.c:2782 [inline]
 try_to_compact_pages+0x32f/0x940 mm/compaction.c:2843
 __alloc_pages_direct_compact+0x65/0x1d0 mm/page_alloc.c:4066
 __alloc_pages_slowpath+0x360/0x5f0 mm/page_alloc.c:4787
 __alloc_frozen_pages_noprof+0x270/0x360 mm/page_alloc.c:5161
 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2416
 alloc_frozen_pages_noprof+0x90/0x110 mm/mempolicy.c:2487
 ___kmalloc_large_node+0x52/0x100 mm/slub.c:4317
 __kmalloc_large_node_noprof+0x16/0xa0 mm/slub.c:4348
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_noprof+0x2ab/0x3e0 mm/slub.c:4388
 kmalloc_noprof include/linux/slab.h:909 [inline]
 kmalloc_array_noprof include/linux/slab.h:948 [inline]
 io_vec_realloc io_uring/rsrc.c:1327 [inline]
 io_import_reg_vec+0x645/0xe80 io_uring/rsrc.c:1520
 io_sendmsg_zc+0x91/0x550 io_uring/net.c:1545
 __io_issue_sqe+0xfb/0x2e0 io_uring/io_uring.c:1771
 io_issue_sqe+0x53/0x970 io_uring/io_uring.c:1794
 io_queue_sqe io_uring/io_uring.c:2023 [inline]
 io_submit_sqe io_uring/io_uring.c:2283 [inline]
 io_submit_sqes+0x675/0x1060 io_uring/io_uring.c:2396
 __do_sys_io_uring_enter io_uring/io_uring.c:3463 [inline]
 __se_sys_io_uring_enter+0x1c1/0x1b70 io_uring/io_uring.c:3397
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3397
 x64_sys_call+0x2de1/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:427
 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 0xffff88823fffacd8 of 8 bytes by task 3535 on cpu 0:
 compact_zone+0x59b/0x2900 mm/compaction.c:2564
 compact_zone_order mm/compaction.c:2782 [inline]
 try_to_compact_pages+0x32f/0x940 mm/compaction.c:2843
 __alloc_pages_direct_compact+0x65/0x1d0 mm/page_alloc.c:4066
 __alloc_pages_slowpath+0x360/0x5f0 mm/page_alloc.c:4787
 __alloc_frozen_pages_noprof+0x270/0x360 mm/page_alloc.c:5161
 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2416
 alloc_frozen_pages_noprof+0x90/0x110 mm/mempolicy.c:2487
 ___kmalloc_large_node+0x52/0x100 mm/slub.c:4317
 __kmalloc_large_node_noprof+0x16/0xa0 mm/slub.c:4348
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_noprof+0x2ab/0x3e0 mm/slub.c:4388
 kmalloc_noprof include/linux/slab.h:909 [inline]
 kmalloc_array_noprof include/linux/slab.h:948 [inline]
 io_vec_realloc io_uring/rsrc.c:1327 [inline]
 io_import_reg_vec+0x645/0xe80 io_uring/rsrc.c:1520
 io_sendmsg_zc+0x91/0x550 io_uring/net.c:1545
 __io_issue_sqe+0xfb/0x2e0 io_uring/io_uring.c:1771
 io_issue_sqe+0x53/0x970 io_uring/io_uring.c:1794
 io_queue_sqe io_uring/io_uring.c:2023 [inline]
 io_submit_sqe io_uring/io_uring.c:2283 [inline]
 io_submit_sqes+0x675/0x1060 io_uring/io_uring.c:2396
 __do_sys_io_uring_enter io_uring/io_uring.c:3463 [inline]
 __se_sys_io_uring_enter+0x1c1/0x1b70 io_uring/io_uring.c:3397
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3397
 x64_sys_call+0x2de1/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:427
 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

value changed: 0x0000000000100000 -> 0x0000000000105200

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3535 Comm: syz.4.21 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================
==================================================================
BUG: KCSAN: data-race in compact_zone / compact_zone

write to 0xffff88823fffacd0 of 8 bytes by task 3588 on cpu 1:
 update_cached_migrate mm/compaction.c:446 [inline]
 isolate_migratepages mm/compaction.c:2126 [inline]
 compact_zone+0x136d/0x2900 mm/compaction.c:2617
 compact_zone_order mm/compaction.c:2782 [inline]
 try_to_compact_pages+0x32f/0x940 mm/compaction.c:2843
 __alloc_pages_direct_compact+0x65/0x1d0 mm/page_alloc.c:4066
 __alloc_pages_slowpath+0x1e6/0x5f0 mm/page_alloc.c:4696
 __alloc_frozen_pages_noprof+0x270/0x360 mm/page_alloc.c:5161
 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2416
 alloc_frozen_pages_noprof+0x90/0x110 mm/mempolicy.c:2487
 ___kmalloc_large_node+0x52/0x100 mm/slub.c:4317
 __kmalloc_large_node_noprof+0x16/0xa0 mm/slub.c:4348
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_noprof+0x2ab/0x3e0 mm/slub.c:4388
 kmalloc_noprof include/linux/slab.h:909 [inline]
 kmalloc_array_noprof include/linux/slab.h:948 [inline]
 io_vec_realloc io_uring/rsrc.c:1327 [inline]
 io_import_reg_vec+0x645/0xe80 io_uring/rsrc.c:1520
 io_sendmsg_zc+0x91/0x550 io_uring/net.c:1545
 __io_issue_sqe+0xfb/0x2e0 io_uring/io_uring.c:1771
 io_issue_sqe+0x53/0x970 io_uring/io_uring.c:1794
 io_queue_sqe io_uring/io_uring.c:2023 [inline]
 io_submit_sqe io_uring/io_uring.c:2283 [inline]
 io_submit_sqes+0x675/0x1060 io_uring/io_uring.c:2396
 __do_sys_io_uring_enter io_uring/io_uring.c:3463 [inline]
 __se_sys_io_uring_enter+0x1c1/0x1b70 io_uring/io_uring.c:3397
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3397
 x64_sys_call+0x2de1/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:427
 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 0xffff88823fffacd0 of 8 bytes by task 3535 on cpu 0:
 compact_zone+0x539/0x2900 mm/compaction.c:2591
 compact_zone_order mm/compaction.c:2782 [inline]
 try_to_compact_pages+0x32f/0x940 mm/compaction.c:2843
 __alloc_pages_direct_compact+0x65/0x1d0 mm/page_alloc.c:4066
 __alloc_pages_slowpath+0x1e6/0x5f0 mm/page_alloc.c:4696
 __alloc_frozen_pages_noprof+0x270/0x360 mm/page_alloc.c:5161
 alloc_pages_mpol+0xb3/0x250 mm/mempolicy.c:2416
 alloc_frozen_pages_noprof+0x90/0x110 mm/mempolicy.c:2487
 ___kmalloc_large_node+0x52/0x100 mm/slub.c:4317
 __kmalloc_large_node_noprof+0x16/0xa0 mm/slub.c:4348
 __do_kmalloc_node mm/slub.c:4364 [inline]
 __kmalloc_noprof+0x2ab/0x3e0 mm/slub.c:4388
 kmalloc_noprof include/linux/slab.h:909 [inline]
 kmalloc_array_noprof include/linux/slab.h:948 [inline]
 io_vec_realloc io_uring/rsrc.c:1327 [inline]
 io_import_reg_vec+0x645/0xe80 io_uring/rsrc.c:1520
 io_sendmsg_zc+0x91/0x550 io_uring/net.c:1545
 __io_issue_sqe+0xfb/0x2e0 io_uring/io_uring.c:1771
 io_issue_sqe+0x53/0x970 io_uring/io_uring.c:1794
 io_queue_sqe io_uring/io_uring.c:2023 [inline]
 io_submit_sqe io_uring/io_uring.c:2283 [inline]
 io_submit_sqes+0x675/0x1060 io_uring/io_uring.c:2396
 __do_sys_io_uring_enter io_uring/io_uring.c:3463 [inline]
 __se_sys_io_uring_enter+0x1c1/0x1b70 io_uring/io_uring.c:3397
 __x64_sys_io_uring_enter+0x78/0x90 io_uring/io_uring.c:3397
 x64_sys_call+0x2de1/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:427
 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

value changed: 0x0000000000200000 -> 0x0000000000216800

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3535 Comm: syz.4.21 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
==================================================================
syz.4.21 (3535) used greatest stack depth: 9736 bytes left

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