mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
tcp: unset TCP_REPAIR at the last moment after unlocking network (v2)
TCP_REPAIR should be droppet when a network is unlocked. A network should be unlocked at the last moment, because after this moment restore must not failed, otherwise a state of a tcp connection can be changed and a state of one side in our image will be invalid. v2: use xremalloc instead of mmap and remmap 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
7e22e60f83
commit
c27ff2baac
@@ -1293,7 +1293,8 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core, struct list_head *tgt_v
|
||||
restore_task_vma_len +
|
||||
restore_thread_vma_len +
|
||||
self_vmas_len + vmas_len +
|
||||
SHMEMS_SIZE + TASK_ENTRIES_SIZE);
|
||||
SHMEMS_SIZE + TASK_ENTRIES_SIZE +
|
||||
rst_tcp_socks_size);
|
||||
if (exec_mem_hint == -1) {
|
||||
pr_err("No suitable area for task_restore bootstrap (%ldK)\n",
|
||||
restore_task_vma_len + restore_thread_vma_len);
|
||||
@@ -1369,6 +1370,12 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core, struct list_head *tgt_v
|
||||
if (!task_args->tgt_vmas)
|
||||
goto err;
|
||||
|
||||
mem += vmas_len;
|
||||
if (rst_tcp_socks_remap(mem))
|
||||
goto err;
|
||||
task_args->rst_tcp_socks = mem;
|
||||
task_args->rst_tcp_socks_size = rst_tcp_socks_size;
|
||||
|
||||
/*
|
||||
* Arguments for task restoration.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user