Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
58b0ef65
Commit
58b0ef65
authored
Jul 20, 2012
by
Cyrill Gorcunov
Committed by
Pavel Emelyanov
Jul 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Add test for optional PB fields in core_entry
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@openvz.org
>
parent
5421e44b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
cr-restore.c
cr-restore.c
+13
-2
No files found.
cr-restore.c
View file @
58b0ef65
...
@@ -391,7 +391,7 @@ static int restore_one_zombie(int pid, int exit_code)
...
@@ -391,7 +391,7 @@ static int restore_one_zombie(int pid, int exit_code)
return
-
1
;
return
-
1
;
}
}
static
int
check_core
_header
(
int
pid
,
CoreEntry
*
core
)
static
int
check_core
(
int
pid
,
CoreEntry
*
core
)
{
{
int
fd
=
-
1
,
ret
=
-
1
;
int
fd
=
-
1
,
ret
=
-
1
;
...
@@ -403,6 +403,17 @@ static int check_core_header(int pid, CoreEntry *core)
...
@@ -403,6 +403,17 @@ static int check_core_header(int pid, CoreEntry *core)
pr_err
(
"Core march mismatch %d
\n
"
,
(
int
)
core
->
mtype
);
pr_err
(
"Core march mismatch %d
\n
"
,
(
int
)
core
->
mtype
);
goto
out
;
goto
out
;
}
}
if
(
!
core
->
tc
)
{
pr_err
(
"Core task state data missed
\n
"
);
goto
out
;
}
if
(
!
core
->
ids
&&
core
->
tc
->
task_state
!=
TASK_DEAD
)
{
pr_err
(
"Core IDS data missed for non-zombie
\n
"
);
goto
out
;
}
ret
=
0
;
ret
=
0
;
out:
out:
close_safe
(
&
fd
);
close_safe
(
&
fd
);
...
@@ -427,7 +438,7 @@ static int restore_one_task(int pid)
...
@@ -427,7 +438,7 @@ static int restore_one_task(int pid)
if
(
ret
<
0
)
if
(
ret
<
0
)
return
-
1
;
return
-
1
;
if
(
check_core
_header
(
pid
,
core
))
{
if
(
check_core
(
pid
,
core
))
{
ret
=
-
1
;
ret
=
-
1
;
goto
out
;
goto
out
;
}
}
...
...
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