[CRIU] [PATCH v3 22/33] proc: Close CR_PROC_FD_OFF and TRANSPORT_FD_OFF later

Kirill Tkhai ktkhai at virtuozzo.com
Thu Feb 16 04:09:49 PST 2017


CR_PROC_FD_OFF is need for accessing to foreign tasks
fds, and will be used in the future.

TRANSPORT_FD_OFF is for uniformity.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/cr-restore.c |    2 ++
 criu/files.c      |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index f66e4cd8d..57926a6e0 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -3251,6 +3251,8 @@ static int sigreturn_restore(pid_t pid, struct task_restore_args *task_args, uns
 
 	close_image_dir();
 	close_proc();
+	close_service_fd(TRANSPORT_FD_OFF);
+	close_service_fd(CR_PROC_FD_OFF);
 	close_service_fd(ROOT_FD_OFF);
 	close_service_fd(USERNSD_SK);
 	close_service_fd(FDSTORE_SK_OFF);
diff --git a/criu/files.c b/criu/files.c
index a114e1847..53c4bcc9c 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -1203,7 +1203,6 @@ int prepare_fds(struct pstree_item *me)
 	if (rsti(me)->fdt)
 		futex_inc_and_wake(&rsti(me)->fdt->fdt_lock);
 out:
-	close_service_fd(CR_PROC_FD_OFF);
 	tty_fini_fds();
 	return ret;
 }



More information about the CRIU mailing list