From: Greg Kroah-Hartman Date: Thu, 22 Dec 2011 22:54:34 +0000 (-0800) Subject: 3.1 patches X-Git-Tag: v3.0.15~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7b27ab7dc42167208972ad0d5f0103801fb3b24;p=thirdparty%2Fkernel%2Fstable-queue.git 3.1 patches added patches: memcg-keep-root-group-unchanged-if-creation-fails.patch --- diff --git a/queue-3.1/memcg-keep-root-group-unchanged-if-creation-fails.patch b/queue-3.1/memcg-keep-root-group-unchanged-if-creation-fails.patch new file mode 100644 index 00000000000..e7acb68ef74 --- /dev/null +++ b/queue-3.1/memcg-keep-root-group-unchanged-if-creation-fails.patch @@ -0,0 +1,49 @@ +From a41c58a6665cc995e237303b05db42100b71b65e Mon Sep 17 00:00:00 2001 +From: Hillf Danton +Date: Mon, 19 Dec 2011 17:11:57 -0800 +Subject: memcg: keep root group unchanged if creation fails + +From: Hillf Danton + +commit a41c58a6665cc995e237303b05db42100b71b65e upstream. + +If the request is to create non-root group and we fail to meet it, we +should leave the root unchanged. + +Signed-off-by: Hillf Danton +Signed-off-by: Hugh Dickins +Acked-by: KAMEZAWA Hiroyuki +Acked-by: Michal Hocko +Cc: Balbir Singh +Cc: David Rientjes +Cc: Andrea Arcangeli +Cc: Johannes Weiner +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/memcontrol.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -4898,9 +4898,9 @@ mem_cgroup_create(struct cgroup_subsys * + int cpu; + enable_swap_cgroup(); + parent = NULL; +- root_mem_cgroup = mem; + if (mem_cgroup_soft_limit_tree_init()) + goto free_out; ++ root_mem_cgroup = mem; + for_each_possible_cpu(cpu) { + struct memcg_stock_pcp *stock = + &per_cpu(memcg_stock, cpu); +@@ -4939,7 +4939,6 @@ mem_cgroup_create(struct cgroup_subsys * + return &mem->css; + free_out: + __mem_cgroup_free(mem); +- root_mem_cgroup = NULL; + return ERR_PTR(error); + } + diff --git a/queue-3.1/series b/queue-3.1/series index 40deebd9593..df949418dc5 100644 --- a/queue-3.1/series +++ b/queue-3.1/series @@ -36,3 +36,4 @@ media-s5p-fimc-use-correct-fourcc-for-rgb565-colour-format.patch ath9k-fix-max-phy-rate-at-rate-control-init.patch iwlwifi-do-not-set-the-sequence-control-bit-is-not-needed.patch iwlwifi-allow-to-switch-to-ht40-if-not-associated.patch +memcg-keep-root-group-unchanged-if-creation-fails.patch