================================================================== BUG: KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush write to 0xffff888237c34540 of 4 bytes by task 40 on cpu 1: mem_cgroup_css_rstat_flush+0x4ea/0x540 mm/memcontrol.c:5848 cgroup_rstat_flush_locked+0x93a/0xe20 kernel/cgroup/rstat.c:322 cgroup_rstat_flush+0x2a/0x120 kernel/cgroup/rstat.c:354 do_flush_stats mm/memcontrol.c:745 [inline] flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312 worker_thread+0x526/0x730 kernel/workqueue.c:3393 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 read-write to 0xffff888237c34540 of 4 bytes by task 4885 on cpu 0: 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+0x63a/0x1e30 mm/memory.c:3655 handle_pte_fault mm/memory.c:5311 [inline] __handle_mm_fault mm/memory.c:5436 [inline] handle_mm_fault+0xb7f/0x27e0 mm/memory.c:5601 do_user_addr_fault arch/x86/mm/fault.c:1332 [inline] handle_page_fault arch/x86/mm/fault.c:1475 [inline] exc_page_fault+0x3eb/0x690 arch/x86/mm/fault.c:1533 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 value changed: 0x0000001f -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 4885 Comm: syz-executor.3 Not tainted 6.9.0-syzkaller-07726-g3c999d1ae3c7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 ==================================================================