summaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-12-09 20:38:29 +0800
committerTejun Heo <tj@kernel.org>2013-12-12 10:45:36 -0500
commit0be8669dd530f60cf3f59f084518570c1dfb47ee (patch)
treea485c457cc9745b9687aceef81fdec02846ba7e3 /kernel/cgroup.c
parentb85d20404cef6493f9d2edbafe83f9c72aece9a8 (diff)
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index fb1193bec4af..402f7aab8b2d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4618,6 +4618,7 @@ int __init_or_module cgroup_load_subsys(struct cgroup_subsys *ss)
if (IS_ERR(css)) {
/* failure case - need to deassign the cgroup_subsys[] slot. */
cgroup_subsys[ss->subsys_id] = NULL;
+ mutex_unlock(&cgroup_root_mutex);
mutex_unlock(&cgroup_mutex);
return PTR_ERR(css);
}