From 0be8669dd530f60cf3f59f084518570c1dfb47ee Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Mon, 9 Dec 2013 20:38:29 +0800 Subject: [PATCH] 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 --- kernel/cgroup.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.39.2