================================================================== BUG: KCSAN: data-race in __count_memcg_events / mem_cgroup_css_rstat_flush write to 0xffff888237c344c0 of 4 bytes by task 3280 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] flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335 worker_thread+0x526/0x730 kernel/workqueue.c:3416 kthread+0x1d1/0x210 kernel/kthread.c:388 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 read-write to 0xffff888237c344c0 of 4 bytes by task 18733 on cpu 0: memcg_rstat_updated mm/memcontrol.c:725 [inline] __count_memcg_events+0xce/0x130 mm/memcontrol.c:962 count_memcg_events include/linux/memcontrol.h:1096 [inline] count_memcg_event_mm include/linux/memcontrol.h:1120 [inline] mm_account_fault mm/memory.c:5475 [inline] handle_mm_fault+0x14da/0x27e0 mm/memory.c:5622 faultin_page mm/gup.c:958 [inline] __get_user_pages+0x470/0xec0 mm/gup.c:1257 __get_user_pages_locked mm/gup.c:1525 [inline] __gup_longterm_locked+0x2b6/0x14c0 mm/gup.c:2228 pin_user_pages+0x86/0xc0 mm/gup.c:3401 io_pin_pages+0xc9/0x1f0 io_uring/rsrc.c:891 io_sqe_buffer_register+0x95/0xe00 io_uring/rsrc.c:927 io_sqe_buffers_register+0x27b/0x3a0 io_uring/rsrc.c:1045 __io_uring_register io_uring/register.c:418 [inline] __do_sys_io_uring_register io_uring/register.c:613 [inline] __se_sys_io_uring_register+0xa1b/0x11a0 io_uring/register.c:574 __x64_sys_io_uring_register+0x55/0x70 io_uring/register.c:574 x64_sys_call+0x2af5/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:428 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: 0x0000003a -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 18733 Comm: syz-executor.2 Not tainted 6.9.0-rc5-syzkaller-00355-g2c8159388952 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ==================================================================