Skip to content

Commit

Permalink
cgroup: fix missing unlock on error in cgroup_load_subsys()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Tejun Heo committed Dec 12, 2013
1 parent b85d204 commit 0be8669
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0be8669

Please sign in to comment.