• T
    cgroup: add cgroup_root_mutex · e25e2cbb
    Tejun Heo 提交于
    cgroup wants to make threadgroup stable while modifying cgroup
    hierarchies which will introduce locking dependency on
    cred_guard_mutex from cgroup_mutex.  This unfortunately completes
    circular dependency.
    
     A. cgroup_mutex -> cred_guard_mutex -> s_type->i_mutex_key -> namespace_sem
     B. namespace_sem -> cgroup_mutex
    
    B is from cgroup_show_options() and this patch breaks it by
    introducing another mutex cgroup_root_mutex which nests inside
    cgroup_mutex and protects cgroupfs_root.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Reviewed-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Acked-by: NLi Zefan <lizf@cn.fujitsu.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    e25e2cbb
cgroup.c 138.4 KB