]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/memcontrol.c
mm: memcontrol: fix possible css ref leak on oom
[karo-tx-linux.git] / mm / memcontrol.c
index b3f16ab4b4311d00efd34e9e53022a42b0d43d28..cf428d7b9a03a041516e613563d5d051dfc4c610 100644 (file)
@@ -1604,7 +1604,7 @@ static void memcg_oom_recover(struct mem_cgroup *memcg)
 
 static void mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int order)
 {
-       if (!current->memcg_may_oom)
+       if (!current->memcg_may_oom || current->memcg_in_oom)
                return;
        /*
         * We are in the middle of the charge context here, so we