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
5c06eea2
Commit
5c06eea2
authored
May 23, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Get rid of global root_as_sibling
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
2f5b9904
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
cr-restore.c
criu/cr-restore.c
+6
-6
No files found.
criu/cr-restore.c
View file @
5c06eea2
...
...
@@ -117,7 +117,6 @@ static int prepare_rlimits(int pid, CoreEntry *core);
static
int
prepare_posix_timers
(
int
pid
,
CoreEntry
*
core
);
static
int
prepare_signals
(
int
pid
,
CoreEntry
*
core
);
static
int
root_as_sibling
;
static
unsigned
long
helpers_pos
=
0
;
static
int
n_helpers
=
0
;
static
unsigned
long
zombies_pos
=
0
;
...
...
@@ -760,7 +759,6 @@ static void maybe_clone_parent(struct pstree_item *item,
* least warn a user about potential problems.
*/
rsti
(
item
)
->
clone_flags
|=
CLONE_PARENT
;
root_as_sibling
=
1
;
if
(
rsti
(
item
)
->
clone_flags
&
CLONE_NEWPID
)
pr_warn
(
"Set CLONE_PARENT | CLONE_NEWPID but it might cause restore problem,"
"because not all kernels support such clone flags combinations!
\n
"
);
...
...
@@ -1562,7 +1560,7 @@ static int restore_root_task(struct pstree_item *init)
{
enum
trace_flags
flag
=
TRACE_ALL
;
int
ret
,
fd
,
mnt_ns_fd
=
-
1
;
int
clean_remaps
=
1
;
int
clean_remaps
=
1
,
root_seized
=
0
;
ret
=
run_scripts
(
ACT_PRE_RESTORE
);
if
(
ret
!=
0
)
{
...
...
@@ -1616,8 +1614,10 @@ static int restore_root_task(struct pstree_item *init)
restore_origin_ns_hook
();
if
(
r
oot_as_sibling
)
{
if
(
r
sti
(
init
)
->
clone_flags
&
CLONE_PARENT
)
{
struct
sigaction
act
;
root_seized
=
1
;
/*
* Root task will be our sibling. This means, that
* we will not notice when (if) it dies in SIGCHLD
...
...
@@ -1734,14 +1734,14 @@ static int restore_root_task(struct pstree_item *init)
* -------------------------------------------------------------
* Below this line nothing should fail, because network is unlocked
*/
attach_to_tasks
(
root_
as_sibling
);
attach_to_tasks
(
root_
seized
);
ret
=
restore_switch_stage
(
CR_STATE_RESTORE_CREDS
);
BUG_ON
(
ret
);
timing_stop
(
TIME_RESTORE
);
ret
=
catch_tasks
(
root_
as_sibling
,
&
flag
);
ret
=
catch_tasks
(
root_
seized
,
&
flag
);
pr_info
(
"Restore finished successfully. Resuming tasks.
\n
"
);
futex_set_and_wake
(
&
task_entries
->
start
,
CR_STATE_COMPLETE
);
...
...
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