summaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2013-03-28 08:48:14 +0100
committerTejun Heo <tj@kernel.org>2013-04-07 09:28:23 -0700
commitd9c10ddddc98db0a316243cd266c466875975a94 (patch)
tree534cfc1a15c32047b07d7879c0b4a87a5d2095fd /kernel/cgroup.c
parent1e2ccd1c0f67c3f958d6139de2496787b9a57182 (diff)
memcg: fix memcg_cache_name() to use cgroup_name()
As cgroup supports rename, it's unsafe to dereference dentry->d_name without proper vfs locks. Fix this by using cgroup_name() rather than dentry directly. Also open code memcg_cache_name because it is called only from kmem_cache_dup which frees the returned name right after kmem_cache_create_memcg makes a copy of it. Such a short-lived allocation doesn't make too much sense. So replace it by a static buffer as kmem_cache_dup is called with memcg_cache_mutex. Signed-off-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Glauber Costa <glommer@parallels.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
0 files changed, 0 insertions, 0 deletions