[CRIU] [PATCH 20/39] restore: close PROC_FD_OFF before calling sigreturn

Andrey Vagin avagin at openvz.org
Mon Apr 21 07:23:30 PDT 2014


mntns_collect_root() uses PROC_FD_OFF, so we need to close it.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index 9537de2..8910adc 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -2356,7 +2356,6 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
 	 */
 
 	ret = parse_self_maps_lite(&self_vmas);
-	close_proc();
 	if (ret < 0)
 		goto err;
 
@@ -2614,6 +2613,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
 		goto err;
 
 	close_image_dir();
+	close_proc();
 	close_service_fd(ROOT_FD_OFF);
 
 	__gcov_flush();
-- 
1.8.5.3



More information about the CRIU mailing list