提交 0be8669d 编写于 作者: W Wei Yongjun 提交者: Tejun Heo

cgroup: fix missing unlock on error in cgroup_load_subsys()

Add the missing unlock before return from function cgroup_load_subsys()
in the error handling case.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NTejun Heo <tj@kernel.org>
Acked-by: NLi Zefan <lizefan@huawei.com>
上级 b85d2040
...@@ -4618,6 +4618,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss) ...@@ -4618,6 +4618,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
if (IS_ERR(css)) { if (IS_ERR(css)) {
/* failure case - need to deassign the cgroup_subsys[] slot. */ /* failure case - need to deassign the cgroup_subsys[] slot. */
cgroup_subsys[ss->subsys_id] = NULL; cgroup_subsys[ss->subsys_id] = NULL;
mutex_unlock(&cgroup_root_mutex);
mutex_unlock(&cgroup_mutex); mutex_unlock(&cgroup_mutex);
return PTR_ERR(css); return PTR_ERR(css);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册