]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
cgroup: fix missing unlock on error in cgroup_load_subsys()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 9 Dec 2013 12:38:29 +0000 (20:38 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 12 Dec 2013 15:45:36 +0000 (10:45 -0500)
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>
kernel/cgroup.c

index fb1193bec4affe1666e98fe3e7a98cb06e16b63a..402f7aab8b2d9e5bf51bb3b5da150b81787d7cdd 100644 (file)
@@ -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);
        }