[CRIU] [PATCH] restore: Report error number if PR_SET_MM failed

Cyrill Gorcunov gorcunov at openvz.org
Tue Dec 6 11:25:21 PST 2016


Reported-by: Andrei Vagin <avagin at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/pie/restorer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index c837656379d3..764a5e6995b6 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -1378,8 +1378,11 @@ skip_vdso:
 		 * new ones from image file.
 		 */
 		ret |= restore_self_exe_late(args);
-	} else
+	} else {
+		if (ret)
+			pr_err("sys_prctl(PR_SET_MM, PR_SET_MM_MAP) failed with %d\n", (int)ret);
 		sys_close(args->fd_exe_link);
+	}
 
 	if (ret)
 		goto core_restore_end;
-- 
2.7.4



More information about the CRIU mailing list