================================================================== BUG: KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush read-write to 0xffff888237d344c0 of 4 bytes by task 2748 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] __filemap_add_folio+0xc6/0x6d0 mm/filemap.c:864 filemap_add_folio+0x70/0x160 mm/filemap.c:947 __filemap_get_folio+0x2f1/0x5b0 mm/filemap.c:1934 grow_dev_folio fs/buffer.c:1042 [inline] grow_buffers fs/buffer.c:1108 [inline] __getblk_slow fs/buffer.c:1134 [inline] bdev_getblk+0x1a5/0x420 fs/buffer.c:1429 __getblk include/linux/buffer_head.h:355 [inline] jbd2_journal_get_descriptor_buffer+0xdd/0x220 fs/jbd2/journal.c:1010 jbd2_journal_commit_transaction+0xbf4/0x33d0 fs/jbd2/commit.c:611 kjournald2+0x243/0x430 fs/jbd2/journal.c:201 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 write to 0xffff888237d344c0 of 4 bytes by task 1481 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:3267 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3348 worker_thread+0x526/0x730 kernel/workqueue.c:3429 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 value changed: 0x00000028 -> 0x0000002a Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 1481 Comm: kworker/u8:5 Not tainted 6.9.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events_unbound flush_memcg_stats_dwork ==================================================================