================================================================== BUG: KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffc5a0c0 of 4 bytes by task 10446 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 0xffffe8ffffc5a0c0 of 4 bytes by task 13029 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_uncharge_pages+0xe2/0x200 mm/memcontrol.c:3280 __memcg_kmem_uncharge_page+0x53/0x110 mm/memcontrol.c:3354 free_pages_prepare mm/page_alloc.c:1098 [inline] free_unref_page_prepare+0x61/0x2c0 mm/page_alloc.c:2347 free_unref_page+0x34/0x180 mm/page_alloc.c:2487 vfree+0x211/0x390 mm/vmalloc.c:3340 __vmalloc_area_node mm/vmalloc.c:3701 [inline] __vmalloc_node_range+0xe16/0xee0 mm/vmalloc.c:3818 kvmalloc_node+0x121/0x170 mm/util.c:659 kvmalloc include/linux/slab.h:766 [inline] kvzalloc include/linux/slab.h:774 [inline] ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:255 hash_netiface_create+0x277/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1103 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2564 nfnetlink_rcv+0x16c/0x15b0 net/netfilter/nfnetlink.c:664 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x5d3/0x6e0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:745 ____sys_sendmsg+0x312/0x410 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x1e9/0x280 net/socket.c:2667 __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2674 x64_sys_call+0xae9/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:47 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: 13029 Comm: syz-executor.2 Tainted: G W 6.9.0-syzkaller-07726-g3c999d1ae3c7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 ==================================================================