projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
913ffdb
)
cgroup: fix a leak when percpu_ref_init() fails
author
Li Zefan
<lizefan@huawei.com>
Wed, 31 Jul 2013 08:16:28 +0000
(16:16 +0800)
committer
Tejun Heo
<tj@kernel.org>
Wed, 31 Jul 2013 10:13:25 +0000
(06:13 -0400)
ss->css_free() is not called when perfcpu_ref_init() fails.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/cgroup.c
b/kernel/cgroup.c
index afb8d53ca6c7f2cdd52948f9ec5c87a534c1546d..468e410f9e612099e52eb794629563ca14dd9c3c 100644
(file)
--- a/
kernel/cgroup.c
+++ b/
kernel/cgroup.c
@@
-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);