• L
    cgroup: remove duplicate RCU free on struct cgroup · 86a3db56
    Li Zefan 提交于
    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 a47295e6 ("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: NLi Zefan <lizefan@huawei.com>
    Signed-off-by: NTejun Heo <tj@kernel.org>
    86a3db56
cgroup.c 147.7 KB