chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73814ca
)
cgroup.c: check return value of unit_realize_cgroup_now()
author
Harald Hoyer
<harald@redhat.com>
Fri, 23 Aug 2013 16:46:06 +0000
(18:46 +0200)
committer
Harald Hoyer
<harald@redhat.com>
Fri, 23 Aug 2013 16:46:51 +0000
(18:46 +0200)
do not recurse further, if unit_realize_cgroup_now() failed
src/core/cgroup.c
patch
|
blob
|
history
diff --git
a/src/core/cgroup.c
b/src/core/cgroup.c
index 5a1c3adacd19af3f8ff2c67ebcb98ea7ab2e53cd..50b17f3802d6e453584cca0065ab86a297c39d51 100644
(file)
--- a/
src/core/cgroup.c
+++ b/
src/core/cgroup.c
@@
-432,8
+432,13
@@
static int unit_realize_cgroup_now(Unit *u) {
return 0;
/* First, realize parents */
- if (UNIT_ISSET(u->slice))
- unit_realize_cgroup_now(UNIT_DEREF(u->slice));
+ if (UNIT_ISSET(u->slice)) {
+ int r;
+
+ r = unit_realize_cgroup_now(UNIT_DEREF(u->slice));
+ if (r < 0)
+ return r;
+ }
/* And then do the real work */
return unit_create_cgroups(u, mask);