Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
5fb9efeb
Unverified
Commit
5fb9efeb
authored
Feb 17, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: ensure leaf cgroup is correctly pruned on creation failure
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
a291dc9c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
cgfsng.c
src/lxc/cgroups/cgfsng.c
+5
-5
No files found.
src/lxc/cgroups/cgfsng.c
View file @
5fb9efeb
...
@@ -1163,7 +1163,7 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
...
@@ -1163,7 +1163,7 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
return
true
;
return
true
;
}
}
static
void
cgroup_tree_
leaf_remove
(
struct
hierarchy
*
h
,
const
char
*
path_prune
,
static
void
cgroup_tree_
prune_leaf
(
struct
hierarchy
*
h
,
const
char
*
path_prune
,
bool
payload
)
bool
payload
)
{
{
int
ret
;
int
ret
;
...
@@ -1359,8 +1359,8 @@ __cgfsng_ops static bool cgfsng_monitor_create(struct cgroup_ops *ops, struct lx
...
@@ -1359,8 +1359,8 @@ __cgfsng_ops static bool cgfsng_monitor_create(struct cgroup_ops *ops, struct lx
continue
;
continue
;
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
maybe_empty
(
ops
->
hierarchies
[
i
]
->
monitor_full_path
));
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
maybe_empty
(
ops
->
hierarchies
[
i
]
->
monitor_full_path
));
for
(
int
j
=
0
;
j
<
i
;
j
++
)
for
(
int
j
=
0
;
j
<
=
i
;
j
++
)
cgroup_tree_
leaf_remove
(
ops
->
hierarchies
[
j
],
cgroup_tree_
prune_leaf
(
ops
->
hierarchies
[
j
],
monitor_cgroup
,
false
);
monitor_cgroup
,
false
);
idx
++
;
idx
++
;
...
@@ -1458,8 +1458,8 @@ __cgfsng_ops static bool cgfsng_payload_create(struct cgroup_ops *ops, struct lx
...
@@ -1458,8 +1458,8 @@ __cgfsng_ops static bool cgfsng_payload_create(struct cgroup_ops *ops, struct lx
continue
;
continue
;
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
container_full_path
?:
"(null)"
);
DEBUG
(
"Failed to create cgroup
\"
%s
\"
"
,
ops
->
hierarchies
[
i
]
->
container_full_path
?:
"(null)"
);
for
(
int
j
=
0
;
j
<
i
;
j
++
)
for
(
int
j
=
0
;
j
<
=
i
;
j
++
)
cgroup_tree_
leaf_remove
(
ops
->
hierarchies
[
j
],
cgroup_tree_
prune_leaf
(
ops
->
hierarchies
[
j
],
limiting_cgroup
?:
container_cgroup
,
limiting_cgroup
?:
container_cgroup
,
true
);
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment