From: Vladimir Davydov Date: Thu, 2 Jan 2014 20:58:47 +0000 (-0800) Subject: memcg: fix memcg_size() calculation X-Git-Tag: v3.12.7~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d2bdfb0f5b57578ade944a2b4c616f0cb06a9526;p=kernel%2Fkernel-generic.git memcg: fix memcg_size() calculation commit 695c60830764945cf61a2cc623eb1392d137223e upstream. The mem_cgroup structure contains nr_node_ids pointers to mem_cgroup_per_node objects, not the objects themselves. Signed-off-by: Vladimir Davydov Acked-by: Michal Hocko Cc: Glauber Costa Cc: Johannes Weiner Cc: Balbir Singh Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 36cc2d0..e0e9792 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -337,7 +337,7 @@ struct mem_cgroup { static size_t memcg_size(void) { return sizeof(struct mem_cgroup) + - nr_node_ids * sizeof(struct mem_cgroup_per_node); + nr_node_ids * sizeof(struct mem_cgroup_per_node *); } /* internal only representation about the status of kmem accounting. */