================================================================== BUG: KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffc43100 of 4 bytes by task 5637 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] 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 read-write to 0xffffe8ffffc43100 of 4 bytes by task 5817 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] memcg_account_kmem mm/memcontrol.c:3258 [inline] obj_cgroup_charge_pages+0xf7/0x1d0 mm/memcontrol.c:3306 obj_cgroup_charge+0xc8/0x130 mm/memcontrol.c:3593 __memcg_slab_pre_alloc_hook+0xe3/0x130 mm/slub.c:1919 memcg_slab_pre_alloc_hook mm/slub.c:1940 [inline] slab_pre_alloc_hook mm/slub.c:3757 [inline] slab_alloc_node mm/slub.c:3833 [inline] kmem_cache_alloc_lru+0x1a5/0x2f0 mm/slub.c:3870 alloc_inode_sb include/linux/fs.h:3091 [inline] sock_alloc_inode+0x34/0xa0 net/socket.c:308 alloc_inode+0x3c/0x160 fs/inode.c:261 new_inode_pseudo+0x17/0x70 fs/inode.c:1007 sock_alloc net/socket.c:634 [inline] __sock_create+0x12b/0x4f0 net/socket.c:1535 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0xae/0x240 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x3f/0x50 net/socket.c:1718 x64_sys_call+0x21c3/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:42 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: 0x0000001a -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 5817 Comm: syz-executor.4 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================