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
4f4a4976
Unverified
Commit
4f4a4976
authored
Jun 05, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgroups: prevent segfault
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
26a37651
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cgfsng.c
src/lxc/cgroups/cgfsng.c
+3
-3
No files found.
src/lxc/cgroups/cgfsng.c
View file @
4f4a4976
...
@@ -453,8 +453,10 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized)
...
@@ -453,8 +453,10 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized)
TRACE
(
"The path
\"
"
__OFFLINE_CPUS
"
\"
to read offline cpus from does not exist"
);
TRACE
(
"The path
\"
"
__OFFLINE_CPUS
"
\"
to read offline cpus from does not exist"
);
}
}
if
((
maxisol
==
0
)
&&
(
maxoffline
==
0
))
if
((
maxisol
==
0
)
&&
(
maxoffline
==
0
))
{
cpulist
=
move_ptr
(
posscpus
);
goto
copy_parent
;
goto
copy_parent
;
}
possmask
=
lxc_cpumask
(
posscpus
,
maxposs
);
possmask
=
lxc_cpumask
(
posscpus
,
maxposs
);
if
(
!
possmask
)
{
if
(
!
possmask
)
{
...
@@ -506,8 +508,6 @@ copy_parent:
...
@@ -506,8 +508,6 @@ copy_parent:
fpath
=
must_make_path
(
path
,
"cpuset.cpus"
,
NULL
);
fpath
=
must_make_path
(
path
,
"cpuset.cpus"
,
NULL
);
ret
=
lxc_write_to_file
(
fpath
,
cpulist
,
strlen
(
cpulist
),
false
,
ret
=
lxc_write_to_file
(
fpath
,
cpulist
,
strlen
(
cpulist
),
false
,
0666
);
0666
);
if
(
cpulist
==
posscpus
)
cpulist
=
NULL
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to write cpu list to
\"
%s
\"
"
,
fpath
);
SYSERROR
(
"Failed to write cpu list to
\"
%s
\"
"
,
fpath
);
return
false
;
return
false
;
...
...
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