syzbot


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

Status: moderation: reported on 2025/01/05 10:41
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+2ae88989d44e82c76378@syzkaller.appspotmail.com
First crash: 9d22h, last: 9d22h
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in compact_zone / compact_zone (6) mm 2 385d 404d 0/28 auto-obsoleted due to no activity on 2024/01/30 17:49
upstream KCSAN: data-race in compact_zone / compact_zone (3) mm 2 1536d 1562d 0/28 auto-closed as invalid on 2020/12/05 18:21
upstream KCSAN: data-race in compact_zone / compact_zone mm 3 1715d 1727d 0/28 auto-closed as invalid on 2020/06/18 13:23
upstream KCSAN: data-race in compact_zone / compact_zone (5) mm 58 1190d 1219d 0/28 auto-closed as invalid on 2021/11/17 00:44
upstream KCSAN: data-race in compact_zone / compact_zone (2) mm 1 1641d 1641d 0/28 auto-closed as invalid on 2020/08/23 00:57
upstream KCSAN: data-race in compact_zone / compact_zone (4) mm 4 1437d 1457d 0/28 auto-closed as invalid on 2021/03/15 05:37

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

write to 0xffff88823fffa898 of 8 bytes by task 6642 on cpu 0:
 compact_zone+0x23a6/0x2930 mm/compaction.c:2619
 compact_zone_order mm/compaction.c:2776 [inline]
 try_to_compact_pages+0x324/0x990 mm/compaction.c:2837
 __alloc_pages_direct_compact+0x6f/0x1e0 mm/page_alloc.c:3685
 __alloc_pages_slowpath+0x1eb/0x5a0 mm/page_alloc.c:4305
 __alloc_pages_noprof+0x264/0x340 mm/page_alloc.c:4766
 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2269
 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2348
 vm_area_alloc_pages mm/vmalloc.c:3591 [inline]
 __vmalloc_area_node mm/vmalloc.c:3669 [inline]
 __vmalloc_node_range_noprof+0x6eb/0xe80 mm/vmalloc.c:3846
 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:672
 kvmalloc_array_node_noprof include/linux/slab.h:1063 [inline]
 xt_alloc_entry_offsets+0x47/0x50 net/netfilter/x_tables.c:968
 translate_table+0xa3/0xf70 net/ipv4/netfilter/ip_tables.c:678
 do_replace net/ipv4/netfilter/ip_tables.c:1137 [inline]
 do_ipt_set_ctl+0x7bd/0x8b0 net/ipv4/netfilter/ip_tables.c:1635
 nf_setsockopt+0x195/0x1b0 net/netfilter/nf_sockopt.c:101
 ip_setsockopt+0xea/0x100 net/ipv4/ip_sockglue.c:1424
 tcp_setsockopt+0x93/0xb0 net/ipv4/tcp.c:4030
 sock_common_setsockopt+0x64/0x80 net/core/sock.c:3817
 smc_setsockopt+0x182/0x7a0 net/smc/af_smc.c:3078
 do_sock_setsockopt net/socket.c:2313 [inline]
 __sys_setsockopt+0x187/0x200 net/socket.c:2338
 __do_sys_setsockopt net/socket.c:2344 [inline]
 __se_sys_setsockopt net/socket.c:2341 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2341
 x64_sys_call+0x282e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:55
 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 0xffff88823fffa898 of 8 bytes by task 6633 on cpu 1:
 compact_zone+0x23a6/0x2930 mm/compaction.c:2619
 compact_zone_order mm/compaction.c:2776 [inline]
 try_to_compact_pages+0x324/0x990 mm/compaction.c:2837
 __alloc_pages_direct_compact+0x6f/0x1e0 mm/page_alloc.c:3685
 __alloc_pages_slowpath+0x1eb/0x5a0 mm/page_alloc.c:4305
 __alloc_pages_noprof+0x264/0x340 mm/page_alloc.c:4766
 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2269
 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2348
 vm_area_alloc_pages mm/vmalloc.c:3591 [inline]
 __vmalloc_area_node mm/vmalloc.c:3669 [inline]
 __vmalloc_node_range_noprof+0x6eb/0xe80 mm/vmalloc.c:3846
 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:672
 kvmalloc_array_node_noprof include/linux/slab.h:1063 [inline]
 xt_alloc_entry_offsets+0x47/0x50 net/netfilter/x_tables.c:968
 translate_table+0xa3/0xf70 net/ipv4/netfilter/ip_tables.c:678
 do_replace net/ipv4/netfilter/ip_tables.c:1137 [inline]
 do_ipt_set_ctl+0x7bd/0x8b0 net/ipv4/netfilter/ip_tables.c:1635
 nf_setsockopt+0x195/0x1b0 net/netfilter/nf_sockopt.c:101
 ip_setsockopt+0xea/0x100 net/ipv4/ip_sockglue.c:1424
 tcp_setsockopt+0x93/0xb0 net/ipv4/tcp.c:4030
 sock_common_setsockopt+0x64/0x80 net/core/sock.c:3817
 smc_setsockopt+0x182/0x7a0 net/smc/af_smc.c:3078
 do_sock_setsockopt net/socket.c:2313 [inline]
 __sys_setsockopt+0x187/0x200 net/socket.c:2338
 __do_sys_setsockopt net/socket.c:2344 [inline]
 __se_sys_setsockopt net/socket.c:2341 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2341
 x64_sys_call+0x282e/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:55
 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: 0x0000000000021200 -> 0x0000000000022a00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6633 Comm: syz.2.841 Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #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
2025/01/05 10:40 upstream ab75170520d4 f3558dbf .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.