================================================================== BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg write to 0xffff888237c2b910 of 4 bytes by task 7017 on cpu 0: consume_stock mm/memcontrol.c:2323 [inline] try_charge_memcg+0xb2d/0xd10 mm/memcontrol.c:2744 try_charge mm/memcontrol.c:2931 [inline] charge_memcg mm/memcontrol.c:7284 [inline] __mem_cgroup_charge+0x63/0x100 mm/memcontrol.c:7299 mem_cgroup_charge include/linux/memcontrol.h:691 [inline] folio_prealloc mm/memory.c:1054 [inline] do_cow_fault mm/memory.c:4918 [inline] do_fault mm/memory.c:5026 [inline] do_pte_missing mm/memory.c:3880 [inline] handle_pte_fault mm/memory.c:5300 [inline] __handle_mm_fault mm/memory.c:5441 [inline] handle_mm_fault+0xae7/0x27e0 mm/memory.c:5606 faultin_page mm/gup.c:958 [inline] __get_user_pages+0x470/0xec0 mm/gup.c:1257 populate_vma_page_range mm/gup.c:1697 [inline] __mm_populate+0x204/0x340 mm/gup.c:1800 mm_populate include/linux/mm.h:3411 [inline] vm_mmap_pgoff+0x1a8/0x250 mm/util.c:578 ksys_mmap_pgoff+0x2bd/0x340 mm/mmap.c:1431 x64_sys_call+0x1815/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:10 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 to 0xffff888237c2b910 of 4 bytes by task 6993 on cpu 1: drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2431 try_charge_memcg+0x6bb/0xd10 mm/memcontrol.c:2791 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 vm_area_alloc_pages mm/vmalloc.c:3561 [inline] __vmalloc_area_node mm/vmalloc.c:3637 [inline] __vmalloc_node_range+0x6f2/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: 0x00000018 -> 0x00000016 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 6993 Comm: syz-executor.2 Not tainted 6.9.0-rc5-syzkaller-00025-ga2c63a3f3d68 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================