================================================================== BUG: KCSAN: data-race in drain_all_stock / drain_stock write to 0xffff888237c28370 of 4 bytes by task 25035 on cpu 0: drain_stock+0x48/0x110 mm/memcontrol.c:2203 __refill_stock mm/memcontrol.c:2243 [inline] refill_stock+0x85/0x130 mm/memcontrol.c:2258 try_charge_memcg+0x7da/0x960 mm/memcontrol.c:2699 obj_cgroup_charge_pages mm/memcontrol.c:2999 [inline] obj_cgroup_charge+0x171/0x2b0 mm/memcontrol.c:3289 memcg_slab_pre_alloc_hook+0xf7/0x170 mm/slab.h:505 slab_pre_alloc_hook mm/slab.h:728 [inline] slab_alloc mm/slab.c:3285 [inline] __kmem_cache_alloc_lru mm/slab.c:3479 [inline] kmem_cache_alloc_lru+0x76/0x2b0 mm/slab.c:3506 __d_alloc+0x3d/0x380 fs/dcache.c:1769 d_alloc_pseudo+0x1a/0x50 fs/dcache.c:1899 alloc_file_pseudo+0x73/0x140 fs/file_table.c:262 sock_alloc_file+0x98/0x1b0 net/socket.c:463 sock_map_fd net/socket.c:487 [inline] __sys_socket+0x100/0x220 net/socket.c:1644 __do_sys_socket net/socket.c:1649 [inline] __se_sys_socket net/socket.c:1647 [inline] __x64_sys_socket+0x3b/0x50 net/socket.c:1647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 read to 0xffff888237c28370 of 4 bytes by task 25032 on cpu 1: drain_all_stock+0xb5/0x2e0 mm/memcontrol.c:2288 try_charge_memcg+0x68a/0x960 mm/memcontrol.c:2630 try_charge mm/memcontrol.c:2757 [inline] mem_cgroup_charge_skmem+0x4d/0x130 mm/memcontrol.c:7051 sock_reserve_memory+0xaf/0x1e0 net/core/sock.c:1016 sock_setsockopt+0xeeb/0x1a40 net/core/sock.c:1481 __sys_setsockopt+0x242/0x2b0 net/socket.c:2255 __do_sys_setsockopt net/socket.c:2270 [inline] __se_sys_setsockopt net/socket.c:2267 [inline] __x64_sys_setsockopt+0x62/0x70 net/socket.c:2267 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 value changed: 0x00000001 -> 0x0000001f Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 25032 Comm: syz-executor.3 Not tainted 5.18.0-syzkaller-10643-g9d004b2f4fea-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================