syzbot


KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (9)

Status: moderation: reported on 2024/07/27 04:54
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+cfbb1471fccd03b4dd8b@syzkaller.appspotmail.com
First crash: 42d, last: 32d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (3) mm 161 1232d 1370d 0/27 auto-closed as invalid on 2021/05/29 14:14
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block mm 1 1690d 1690d 0/27 auto-closed as invalid on 2020/04/01 04:50
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (8) mm 1 207d 207d 0/27 auto-obsoleted due to no activity on 2024/03/19 21:54
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (6) mm 1 503d 503d 0/27 auto-obsoleted due to no activity on 2023/05/28 14:16
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (4) mm 1 1124d 1124d 0/27 auto-closed as invalid on 2021/09/14 06:37
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (2) mm 1 1498d 1498d 0/27 auto-closed as invalid on 2020/09/05 12:48
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (7) mm 1 347d 347d 0/27 auto-obsoleted due to no activity on 2023/10/31 19:28
upstream KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block (5) mm 1 719d 719d 0/27 auto-obsoleted due to no activity on 2022/10/24 05:31

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

write to 0xffff88823fffab98 of 8 bytes by task 17578 on cpu 1:
 update_cached_migrate mm/compaction.c:507 [inline]
 isolate_migratepages_block+0x250b/0x2740 mm/compaction.c:1358
 isolate_migratepages mm/compaction.c:2194 [inline]
 compact_zone+0x1e1e/0x2930 mm/compaction.c:2641
 compact_zone_order mm/compaction.c:2806 [inline]
 try_to_compact_pages+0x388/0x920 mm/compaction.c:2862
 __alloc_pages_direct_compact+0x6f/0x1e0 mm/page_alloc.c:3655
 __alloc_pages_slowpath+0x567/0xd70 mm/page_alloc.c:4333
 __alloc_pages_noprof+0x26d/0x360 mm/page_alloc.c:4713
 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2263
 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2343
 vm_area_alloc_pages mm/vmalloc.c:3584 [inline]
 __vmalloc_area_node mm/vmalloc.c:3660 [inline]
 __vmalloc_node_range_noprof+0x719/0xef0 mm/vmalloc.c:3841
 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:675
 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:256
 hash_netiface_create+0x273/0x730 net/netfilter/ipset/ip_set_hash_gen.h:1568
 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1104
 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2550
 nfnetlink_rcv+0x16c/0x15b0 net/netfilter/nfnetlink.c:664
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x593/0x670 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x140/0x180 net/socket.c:745
 ____sys_sendmsg+0x312/0x410 net/socket.c:2597
 ___sys_sendmsg net/socket.c:2651 [inline]
 __sys_sendmsg+0x1e9/0x280 net/socket.c:2680
 __do_sys_sendmsg net/socket.c:2689 [inline]
 __se_sys_sendmsg net/socket.c:2687 [inline]
 __x64_sys_sendmsg+0x46/0x50 net/socket.c:2687
 x64_sys_call+0x2689/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:47
 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 0xffff88823fffab98 of 8 bytes by task 32 on cpu 0:
 update_cached_migrate mm/compaction.c:506 [inline]
 isolate_migratepages_block+0x24e7/0x2740 mm/compaction.c:1358
 isolate_migratepages mm/compaction.c:2194 [inline]
 compact_zone+0x1e1e/0x2930 mm/compaction.c:2641
 kcompactd_do_work mm/compaction.c:3112 [inline]
 kcompactd+0x4e0/0xd40 mm/compaction.c:3211
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

value changed: 0x0000000000142600 -> 0x0000000000143000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 32 Comm: kcompactd0 Not tainted 6.11.0-rc2-syzkaller-00011-geb5e56d14912 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/06 21:32 upstream eb5e56d14912 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
2024/07/30 22:05 upstream 22f546873149 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
2024/07/30 21:54 upstream 22f546873149 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
2024/07/29 02:22 upstream 8400291e289e 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
2024/07/27 04:54 upstream 2f8c4f506285 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
2024/07/27 04:53 upstream 2f8c4f506285 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in isolate_migratepages_block / isolate_migratepages_block
* Struck through repros no longer work on HEAD.