mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
restore: unlock network before disabling repair mode on sockets (v2)
Window probe is sent during disabling repair mode on a socket, so network must be unlocked in this moment. https://bugzilla.openvz.org/show_bug.cgi?id=2670 v2: don't fail after unlocking network Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
64c37b72ff
commit
81e11b44de
15
cr-restore.c
15
cr-restore.c
@@ -1304,12 +1304,10 @@ static int restore_root_task(struct pstree_item *init)
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
pr_info("Wait until all tasks are restored\n");
|
pr_info("Wait until all tasks are restored\n");
|
||||||
ret = restore_switch_stage(CR_STATE_RESTORE_CREDS);
|
ret = restore_wait_inprogress_tasks();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
futex_wait_until(&task_entries->nr_in_progress, 0);
|
|
||||||
|
|
||||||
/* Restore SIGCHLD here to skip SIGCHLD from a network sctip */
|
/* Restore SIGCHLD here to skip SIGCHLD from a network sctip */
|
||||||
ret = sigaction(SIGCHLD, &old_act, NULL);
|
ret = sigaction(SIGCHLD, &old_act, NULL);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -1317,7 +1315,18 @@ static int restore_root_task(struct pstree_item *init)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Unlock network before disabling repair mode on sockets */
|
||||||
network_unlock();
|
network_unlock();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* -------------------------------------------------------------
|
||||||
|
* Below this line nothing can fail, because network is unlocked
|
||||||
|
*/
|
||||||
|
|
||||||
|
__restore_switch_stage(CR_STATE_RESTORE_CREDS);
|
||||||
|
|
||||||
|
futex_wait_until(&task_entries->nr_in_progress, 0);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
struct pstree_item *pi;
|
struct pstree_item *pi;
|
||||||
|
Reference in New Issue
Block a user