================================================================== BUG: KCSAN: data-race in drain_all_stock / drain_stock write to 0xffff888237c2a300 of 4 bytes by task 28998 on cpu 0: drain_stock+0x48/0xf0 mm/memcontrol.c:2273 __refill_stock+0x33/0xb0 mm/memcontrol.c:2313 refill_stock mm/memcontrol.c:2328 [inline] try_charge_memcg+0x9ee/0xd20 mm/memcontrol.c:2779 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3109 obj_cgroup_charge+0xec/0x140 mm/memcontrol.c:3400 memcg_slab_pre_alloc_hook mm/slab.h:503 [inline] slab_pre_alloc_hook+0x112/0x180 mm/slab.h:714 slab_alloc_node mm/slub.c:3452 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc_lru+0x4e/0x220 mm/slub.c:3501 alloc_inode_sb include/linux/fs.h:2735 [inline] sock_alloc_inode+0x34/0xa0 net/socket.c:305 alloc_inode+0x38/0x150 fs/inode.c:259 new_inode_pseudo+0x17/0x70 fs/inode.c:1017 sock_alloc net/socket.c:631 [inline] __sock_create+0x12b/0x4e0 net/socket.c:1500 sock_create net/socket.c:1587 [inline] __sys_socket_create net/socket.c:1624 [inline] __sys_socket+0x9f/0x220 net/socket.c:1652 __do_sys_socket net/socket.c:1665 [inline] __se_sys_socket net/socket.c:1663 [inline] __x64_sys_socket+0x3f/0x50 net/socket.c:1663 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888237c2a300 of 4 bytes by task 28986 on cpu 1: drain_all_stock+0xd3/0x2d0 mm/memcontrol.c:2358 try_charge_memcg+0x6c5/0xd20 mm/memcontrol.c:2703 obj_cgroup_charge_pages+0xab/0x130 mm/memcontrol.c:3109 __memcg_kmem_charge_page+0x1d5/0x2c0 mm/memcontrol.c:3135 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4494 alloc_pages+0x3e1/0x4e0 vm_area_alloc_pages mm/vmalloc.c:3059 [inline] __vmalloc_area_node mm/vmalloc.c:3135 [inline] __vmalloc_node_range+0x6d2/0xea0 mm/vmalloc.c:3316 kvmalloc_node+0x121/0x160 mm/util.c:629 kvmalloc include/linux/slab.h:720 [inline] xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192 do_replace net/ipv4/netfilter/arp_tables.c:970 [inline] do_arpt_set_ctl+0x615/0x1390 net/ipv4/netfilter/arp_tables.c:1421 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1467 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3697 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3697 __sys_setsockopt+0x1c9/0x230 net/socket.c:2263 __do_sys_setsockopt net/socket.c:2274 [inline] __se_sys_setsockopt net/socket.c:2271 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x0000002b -> 0x0000000c Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 28986 Comm: syz-executor.5 Not tainted 6.5.0-rc6-syzkaller-00200-gd4ddefee5160 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ==================================================================