Skip to contentSkip to conversation

cgroup fixes for 3.11-rc4

GIT PULL Tejun Heo 1 participant 1 message Aug 5, 2013 cgroup

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

Hello, Linus.

This pull request contains just one fix for minor memory leak bug in init failure path and is available at

git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-3.11-fixes

for you to fetch changes up to da0a12caffad2eeadea429f83818408e7b77379a:

cgroup: fix a leak when percpu_ref_init() fails (2013-07-31 06:13:25 -0400)

Thanks.

----------------------------------------------------------------
Li Zefan (1):
cgroup: fix a leak when percpu_ref_init() fails

 kernel/cgroup.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/cgroup.c +3 -1
index afb8d53..468e410 100644
@@ -4344,8 +4344,10 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
 		}
 
 		err = percpu_ref_init(&css->refcnt, css_release);
-		if (err)
+		if (err) {
+			ss->css_free(cgrp);
 			goto err_free_all;
+		}
 
 		init_cgroup_css(css, ss, cgrp);
 
Signature · 1 line
tejun