syzbot


KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush

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

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

write to 0xffffe8ffffd4d000 of 4 bytes by task 2006 on cpu 0:
 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]
 flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read-write to 0xffffe8ffffd4d000 of 4 bytes by task 25341 on cpu 1:
 memcg_rstat_updated mm/memcontrol.c:725 [inline]
 __count_memcg_events+0xce/0x130 mm/memcontrol.c:962
 mem_cgroup_charge_statistics mm/memcontrol.c:990 [inline]
 mem_cgroup_commit_charge+0x92/0x200 mm/memcontrol.c:2975
 charge_memcg mm/memcontrol.c:7288 [inline]
 __mem_cgroup_charge+0x75/0x100 mm/memcontrol.c:7299
 mem_cgroup_charge include/linux/memcontrol.h:691 [inline]
 folio_prealloc mm/memory.c:1054 [inline]
 wp_page_copy mm/memory.c:3263 [inline]
 do_wp_page+0x63b/0x1e70 mm/memory.c:3660
 handle_pte_fault mm/memory.c:5316 [inline]
 __handle_mm_fault mm/memory.c:5441 [inline]
 handle_mm_fault+0xb7f/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

value changed: 0x00000021 -> 0x00000000

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