================================================================== BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush write to 0xffffe8ffffd42dc0 of 4 bytes by task 3126 on cpu 0: 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:3267 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3348 worker_thread+0x526/0x730 kernel/workqueue.c:3429 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 0xffffe8ffffd42dc0 of 4 bytes by task 49 on cpu 1: memcg_rstat_updated mm/memcontrol.c:725 [inline] __mod_memcg_lruvec_state+0x13a/0x1a0 mm/memcontrol.c:875 mod_memcg_lruvec_state include/linux/memcontrol.h:1082 [inline] mod_objcg_mlstate mm/memcontrol.c:3003 [inline] mod_objcg_state+0x43c/0x590 mm/memcontrol.c:3418 __memcg_slab_free_hook+0xe3/0x130 mm/slub.c:2001 memcg_slab_free_hook mm/slub.c:2020 [inline] slab_free mm/slub.c:4284 [inline] kfree+0x1b9/0x280 mm/slub.c:4396 kvfree+0x39/0x40 mm/util.c:680 netdev_freemem+0x2b/0x40 net/core/dev.c:10803 netdev_release+0x58/0x70 net/core/net-sysfs.c:2031 device_release+0x6c/0x150 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0xec/0x180 lib/kobject.c:737 netdev_run_todo+0x6df/0x7d0 net/core/dev.c:10600 rtnl_unlock+0xe/0x20 net/core/rtnetlink.c:152 cleanup_net+0x41c/0x830 net/core/net_namespace.c:636 process_one_work kernel/workqueue.c:3267 [inline] process_scheduled_works+0x465/0x990 kernel/workqueue.c:3348 worker_thread+0x526/0x730 kernel/workqueue.c:3429 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 value changed: 0x0000000f -> 0x00000000 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 49 Comm: kworker/u8:3 Tainted: G W 6.9.0-rc7-syzkaller-00117-g448b3fe5a0ea #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Workqueue: netns cleanup_net ==================================================================