[CRIU] [PATCH v4 01/19] core: Init fdstore even earlier

Kirill Tkhai ktkhai at virtuozzo.com
Wed Jan 10 17:00:32 MSK 2018


Next patch will move SELF_STDIN_OFF sfd to fdstore.
This patch moves fdstore_init() before tty_prep_fds().

v4: New

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/cr-restore.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 7545572dc..f9889099f 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2204,9 +2204,6 @@ static int restore_root_task(struct pstree_item *init)
 	if (prepare_userns_hook())
 		return -1;
 
-	if (fdstore_init())
-		return -1;
-
 	if (prepare_namespace_before_tasks())
 		return -1;
 
@@ -2533,6 +2530,9 @@ int cr_restore_tasks(void)
 	if (prepare_pstree() < 0)
 		goto err;
 
+	if (fdstore_init())
+		goto err;
+
 	if (crtools_prepare_shared() < 0)
 		goto err;
 



More information about the CRIU mailing list