================================================================== BUG: KCSAN: data-race in __mod_memcg_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffc49200 of 4 bytes by task 9759 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] mem_cgroup_flush_stats+0xb2/0xc0 mm/memcontrol.c:766 prepare_scan_control mm/vmscan.c:2234 [inline] shrink_node+0x2f2/0x15a0 mm/vmscan.c:5906 shrink_zones mm/vmscan.c:6152 [inline] do_try_to_free_pages+0x3cc/0xca0 mm/vmscan.c:6214 try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6529 try_charge_memcg+0x279/0xd10 mm/memcontrol.c:2783 obj_cgroup_charge_pages+0xbd/0x1d0 mm/memcontrol.c:3302 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:3328 __alloc_pages+0x1bc/0x360 mm/page_alloc.c:4592 alloc_pages_mpol+0xb1/0x1e0 mm/mempolicy.c:2264 alloc_pages+0xe1/0x100 mm/mempolicy.c:2335 io_mem_alloc_compound io_uring/memmap.c:28 [inline] io_pages_map+0xc5/0x4e0 io_uring/memmap.c:72 io_allocate_scq_urings+0x10d/0x300 io_uring/io_uring.c:3349 io_uring_create+0x53c/0x940 io_uring/io_uring.c:3532 io_uring_setup io_uring/io_uring.c:3645 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:3672 [inline] __se_sys_io_uring_setup+0x1d2/0x1e0 io_uring/io_uring.c:3666 __x64_sys_io_uring_setup+0x31/0x40 io_uring/io_uring.c:3666 x64_sys_call+0x2573/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:426 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 read-write to 0xffffe8ffffc49200 of 4 bytes by task 9756 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] mod_memcg_page_state include/linux/memcontrol.h:1017 [inline] __vmalloc_area_node mm/vmalloc.c:3645 [inline] __vmalloc_node_range+0xa98/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:2559 nfnetlink_rcv+0x170/0x13e0 net/netfilter/nfnetlink.c:659 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: 0x00000011 -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 9756 Comm: syz-executor.0 Not tainted 6.9.0-syzkaller-03117-gb850dc206a57 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 ==================================================================