================================================================== BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg write to 0xffff888237c2a690 of 4 bytes by task 9896 on cpu 0: consume_stock mm/memcontrol.c:2322 [inline] try_charge_memcg+0xb46/0xd20 mm/memcontrol.c:2743 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301 obj_cgroup_charge+0xec/0x140 mm/memcontrol.c:3592 __memcg_slab_pre_alloc_hook+0xe3/0x120 mm/slub.c:1929 memcg_slab_pre_alloc_hook mm/slub.c:1950 [inline] slab_pre_alloc_hook mm/slub.c:3766 [inline] slab_alloc_node mm/slub.c:3842 [inline] __do_kmalloc_node mm/slub.c:3980 [inline] __kmalloc_node+0x254/0x3e0 mm/slub.c:3988 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0x72/0x170 mm/util.c:617 kvmalloc include/linux/slab.h:728 [inline] kvzalloc include/linux/slab.h:736 [inline] alloc_netdev_mqs+0x99/0x8b0 net/core/dev.c:10826 rtnl_create_link+0x23b/0x800 net/core/rtnetlink.c:3382 rtnl_newlink_create net/core/rtnetlink.c:3508 [inline] __rtnl_newlink net/core/rtnetlink.c:3738 [inline] rtnl_newlink+0xe0d/0x1670 net/core/rtnetlink.c:3751 rtnetlink_rcv_msg+0x80a/0x8c0 net/core/rtnetlink.c:6618 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2543 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6636 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x589/0x660 net/netlink/af_netlink.c:1367 netlink_sendmsg+0x66e/0x770 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x1e9/0x270 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 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+0x63/0x6b read to 0xffff888237c2a690 of 4 bytes by task 9857 on cpu 1: drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2430 try_charge_memcg+0x6c2/0xd20 mm/memcontrol.c:2790 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133 alloc_pages+0xe0/0x100 mm/mempolicy.c:2204 __get_free_pages+0xc/0x30 mm/page_alloc.c:4614 io_mem_alloc io_uring/io_uring.c:2808 [inline] io_allocate_scq_urings+0x2b8/0x360 io_uring/io_uring.c:3786 io_uring_create+0x537/0x940 io_uring/io_uring.c:3944 io_uring_setup io_uring/io_uring.c:4056 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:4083 [inline] __se_sys_io_uring_setup+0x1ce/0x1e0 io_uring/io_uring.c:4077 __x64_sys_io_uring_setup+0x31/0x40 io_uring/io_uring.c:4077 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+0x63/0x6b value changed: 0x00000009 -> 0x00000007 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 9857 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 ==================================================================