[Devel] [PATCH RHEL7 COMMIT] ms/mm/memcg: fix memcg_size() calculation

Konstantin Khorenko khorenko at odin.com
Thu Apr 30 08:28:18 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.4.9
------>
commit c6094f3be2fa9604f679529532229dc40f90c08a
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Thu Apr 30 19:28:18 2015 +0400

    ms/mm/memcg: fix memcg_size() calculation
    
    The mem_cgroup structure contains nr_node_ids pointers to
    mem_cgroup_per_node objects, not the objects themselves.
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
    
    Acked-by: Michal Hocko <mhocko at suse.cz>
    Cc: Glauber Costa <glommer at openvz.org>
    Cc: Johannes Weiner <hannes at cmpxchg.org>
    Cc: Balbir Singh <bsingharora at gmail.com>
    Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
    (cherry picked from commit 695c60830764945cf61a2cc623eb1392d137223e)
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a94926f..ac75d76 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -360,7 +360,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. */



More information about the Devel mailing list