From: Wei Yongjun Date: Mon, 9 Dec 2013 12:38:29 +0000 (+0800) Subject: cgroup: fix missing unlock on error in cgroup_load_subsys() X-Git-Tag: v3.14-rc1~136^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0be8669dd530f60cf3f59f084518570c1dfb47ee;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Tejun Heo Acked-by: Li Zefan --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index fb1193bec4aff..402f7aab8b2d9 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); }