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
9981107f
Unverified
Commit
9981107f
authored
Feb 17, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: ensure we prune the limit dir
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
c1ece895
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
cgfsng.c
src/lxc/cgroups/cgfsng.c
+4
-6
No files found.
src/lxc/cgroups/cgfsng.c
View file @
9981107f
...
@@ -1142,14 +1142,12 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
...
@@ -1142,14 +1142,12 @@ static bool cgroup_tree_create(struct cgroup_ops *ops, struct lxc_conf *conf,
* cgroup the container actually resides in, is below fd_limit.
* cgroup the container actually resides in, is below fd_limit.
*/
*/
fd_final
=
__cgroup_tree_create
(
fd_limit
,
cgroup_leaf
,
0755
,
cpuset_v1
,
false
);
fd_final
=
__cgroup_tree_create
(
fd_limit
,
cgroup_leaf
,
0755
,
cpuset_v1
,
false
);
TRACE
(
"Created container cgroup %d->%d(%s)"
,
if
(
fd_final
<
0
)
/* Ensure we don't leave any garbage behind. */
fd_final
,
fd_limit
,
cgroup_leaf
);
cgroup_tree_prune
(
h
->
dfd_base
,
cgroup_limit_dir
);
}
else
{
}
else
{
fd_final
=
__cgroup_tree_create
(
h
->
dfd_base
,
cgroup_limit_dir
,
0755
,
cpuset_v1
,
false
);
TRACE
(
"Created %s cgroup %d->%d(%s)"
,
payload
?
"payload"
:
"monitor"
,
fd_final
,
h
->
dfd_base
,
cgroup_leaf
);
path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
cgroup_limit_dir
,
NULL
);
path
=
must_make_path
(
h
->
mountpoint
,
h
->
container_base_path
,
cgroup_limit_dir
,
NULL
);
fd_final
=
__cgroup_tree_create
(
h
->
dfd_base
,
cgroup_limit_dir
,
0755
,
cpuset_v1
,
false
);
}
}
if
(
fd_final
<
0
)
if
(
fd_final
<
0
)
return
syserrno
(
false
,
"Failed to create %s cgroup %d(%s)"
,
payload
?
"payload"
:
"monitor"
,
h
->
dfd_base
,
cgroup_limit_dir
);
return
syserrno
(
false
,
"Failed to create %s cgroup %d(%s)"
,
payload
?
"payload"
:
"monitor"
,
h
->
dfd_base
,
cgroup_limit_dir
);
...
...
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