]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: remove duplicate RCU free on struct cgroup
authorLi Zefan <lizefan@huawei.com>
Thu, 24 Jan 2013 06:31:27 +0000 (14:31 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 24 Jan 2013 20:05:18 +0000 (12:05 -0800)
commit320a6a1289a6254ea3768f115536ec57de344767
tree62fb73cc15fbcb751ee434a7bd9d1546851a4556
parent26fe46fa7feabaee180be4881a6c370a64609164
cgroup: remove duplicate RCU free on struct cgroup

When destroying a cgroup, though in cgroup_diput() we've called
synchronize_rcu(), we then still have to free it via call_rcu().

The story is, long ago to fix a race between reading /proc/sched_debug
and freeing cgroup, the code was changed to utilize call_rcu(). See
commit 33ae40136ee28f1ceddb1f69bc791189a0e1d956 ("cgroups: make
cgroup_path() RCU-safe")

As we've fixed cpu cgroup that cpu_cgroup_offline_css() is used
to unregister a task_group so there won't be concurrent access
to this task_group after synchronize_rcu() in diput(). Now we can
just kfree(cgrp).

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c