syzbot


KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush

Status: moderation: reported on 2024/02/11 11:53
Subsystems: mm cgroups
[Documentation on labels]
Reported-by: syzbot+d265d3714ae3845b0c0c@syzkaller.appspotmail.com
First crash: 62d, last: 6h38m

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

write to 0xffffe8ffffc5d740 of 4 bytes by task 19396 on cpu 1:
 mem_cgroup_css_rstat_flush+0x4ea/0x540 mm/memcontrol.c:5848
 cgroup_rstat_flush_locked+0x848/0x980 kernel/cgroup/rstat.c:245
 cgroup_rstat_flush+0x26/0x40 kernel/cgroup/rstat.c:277
 do_flush_stats mm/memcontrol.c:745 [inline]
 mem_cgroup_flush_stats+0xb2/0xc0 mm/memcontrol.c:766
 prepare_scan_control mm/vmscan.c:2234 [inline]
 shrink_node+0x2f2/0x15a0 mm/vmscan.c:5906
 shrink_zones mm/vmscan.c:6152 [inline]
 do_try_to_free_pages+0x3cc/0xca0 mm/vmscan.c:6214
 try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6529
 try_charge_memcg+0x279/0xd10 mm/memcontrol.c:2783
 try_charge mm/memcontrol.c:2931 [inline]
 charge_memcg mm/memcontrol.c:7284 [inline]
 mem_cgroup_swapin_charge_folio+0x107/0x1a0 mm/memcontrol.c:7369
 __read_swap_cache_async+0x2b9/0x520 mm/swap_state.c:514
 swap_cluster_readahead+0x276/0x3f0 mm/swap_state.c:678
 swapin_readahead+0xe2/0x7a0 mm/swap_state.c:904
 do_swap_page+0x3bb/0x15f0 mm/memory.c:4048
 handle_pte_fault mm/memory.c:5303 [inline]
 __handle_mm_fault mm/memory.c:5441 [inline]
 handle_mm_fault+0x7fa/0x27e0 mm/memory.c:5606
 do_user_addr_fault arch/x86/mm/fault.c:1362 [inline]
 handle_page_fault arch/x86/mm/fault.c:1505 [inline]
 exc_page_fault+0x3eb/0x6d0 arch/x86/mm/fault.c:1563
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read-write to 0xffffe8ffffc5d740 of 4 bytes by task 19397 on cpu 0:
 memcg_rstat_updated mm/memcontrol.c:725 [inline]
 __mod_memcg_state+0x10c/0x170 mm/memcontrol.c:824
 mod_memcg_state include/linux/memcontrol.h:1002 [inline]
 mod_memcg_page_state include/linux/memcontrol.h:1017 [inline]
 __vmalloc_area_node mm/vmalloc.c:3645 [inline]
 __vmalloc_node_range+0xa98/0xee0 mm/vmalloc.c:3818
 __bpf_map_area_alloc kernel/bpf/syscall.c:307 [inline]
 bpf_map_area_alloc+0xd8/0x110 kernel/bpf/syscall.c:314
 sock_map_alloc+0x13a/0x190 net/core/sock_map.c:49
 map_create+0x83c/0xb90 kernel/bpf/syscall.c:1320
 __sys_bpf+0x667/0x7a0 kernel/bpf/syscall.c:5642
 __do_sys_bpf kernel/bpf/syscall.c:5767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5765 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5765
 x64_sys_call+0x86c/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:322
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000027 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 19397 Comm: syz-executor.4 Tainted: G        W          6.9.0-rc3-syzkaller-00355-g7efd0a74039f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (197):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/13 22:11 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/13 07:23 upstream 8f2c057754b2 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/12 17:21 upstream 5939d45155bb c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/12 15:10 upstream 586b5dfb51b9 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/12 04:11 upstream 586b5dfb51b9 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/11 15:31 upstream e8c39d0f57f3 95ed9ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/11 00:47 upstream 9875c0beb8ad 4320ec32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/10 12:33 upstream 2c71fdf02a95 4320ec32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/10 08:53 upstream 2c71fdf02a95 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/09 19:28 upstream 20cb38a7af88 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/09 15:36 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/09 02:00 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/08 12:38 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/08 06:39 upstream fec50db7033e ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/07 17:19 upstream 9fe30842a90b ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/06 18:18 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/06 04:12 upstream 104db052b62d ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/05 14:20 upstream 8cb4a9a82b21 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/05 00:40 upstream c88b9b4cde17 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/04 12:51 upstream c85af715cac0 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/04 09:28 upstream c85af715cac0 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/04 04:53 upstream c85af715cac0 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/03 15:30 upstream 3e92c1e6cd87 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/03 02:08 upstream b1e6ec0a0fd0 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/02 22:03 upstream b1e6ec0a0fd0 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/02 13:41 upstream 026e680b0a08 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/01 23:59 upstream 026e680b0a08 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/04/01 08:41 upstream 39cd87c4eb2b 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/31 18:59 upstream 18737353cca0 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/31 04:28 upstream 712e14250dd2 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/30 14:53 upstream 486291a0e624 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/30 01:36 upstream 4535e1a4174c 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/29 20:57 upstream 4535e1a4174c c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/29 04:45 upstream 317c7bc0ef03 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/29 03:35 upstream 317c7bc0ef03 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/28 13:55 upstream 8d025e2092e2 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/28 08:07 upstream 8d025e2092e2 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/27 19:19 upstream 498e47cd1d1f 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/27 17:39 upstream 498e47cd1d1f 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/26 23:02 upstream 7033999ecd7b 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/26 18:34 upstream 928a87efa423 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/26 02:00 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/25 10:36 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/25 10:25 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/24 21:13 upstream 5e74df2f8f15 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/03/24 07:55 upstream 70293240c5ce 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
2024/02/11 11:52 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush
* Struck through repros no longer work on HEAD.