[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openvz-criu
Subject:    [CRIU] [PATCH 2/4] parasite: Move call to arch_can_dump_task lower
From:       Pavel Emelyanov <xemul () virtuozzo ! com>
Date:       2016-10-30 7:37:03
Message-ID: 5815A31F.4060309 () virtuozzo ! com
[Download RAW message or body]

It doesn't matter much how late we check this, but in the
new place we already have parasite_ctl I will need in the
next patch.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/parasite-syscall.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index 2fe6e87..5ebb7aa 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -1243,9 +1243,6 @@ struct parasite_ctl *parasite_prep_ctl(pid_t pid, unsigned long exec_start)
 {
 	struct parasite_ctl *ctl = NULL;
 
-	if (!arch_can_dump_task(pid))
-		goto err;
-
 	/*
 	 * Control block early setup.
 	 */
@@ -1481,6 +1478,8 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
 	parasite_ensure_args_size(dump_pages_args_size(vma_area_list));
 	parasite_ensure_args_size(aio_rings_args_size(vma_area_list));
 
+	if (!arch_can_dump_task(pid))
+		goto err_restore;
 	/*
 	 * Inject a parasite engine. Ie allocate memory inside alien
 	 * space and copy engine code there. Then re-map the engine
-- 
2.5.0

_______________________________________________
CRIU mailing list
CRIU@openvz.org
https://lists.openvz.org/mailman/listinfo/criu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic