From: Jiayuan Chen memory.oom.group defaults to disabled, but css_reset did not clear memcg->oom_group when a disabled memory css is kept alive by another controller dependency. Reset it with the other memory controller policies so a hidden memcg cannot keep applying stale group OOM kill policy. Cc: Jiayuan Chen Signed-off-by: Jiayuan Chen --- It is found when Sashiko reviewed my previous patch. https://sashiko.dev/#/patchset/20260702024827.353185-1-jiayuan.chen%40linux.dev --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index c20ef3c1d6fe..c7de62c8f86f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4362,6 +4362,7 @@ static void mem_cgroup_css_reset(struct cgroup_subsys_state *css) page_counter_set_max(&memcg->memory, PAGE_COUNTER_MAX); page_counter_set_max(&memcg->swap, PAGE_COUNTER_MAX); + WRITE_ONCE(memcg->oom_group, false); #ifdef CONFIG_ZSWAP WRITE_ONCE(memcg->zswap_max, PAGE_COUNTER_MAX); WRITE_ONCE(memcg->zswap_writeback, true); -- 2.43.0