[CRIU] [PATCH] rst: check memfd_create() in restore only

Andrey Vagin avagin at openvz.org
Mon Oct 27 04:17:24 PDT 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 kerndat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kerndat.c b/kerndat.c
index 7d36c9e..5ab7080 100644
--- a/kerndat.c
+++ b/kerndat.c
@@ -251,8 +251,6 @@ int kerndat_init(void)
 		ret = init_zero_page_pfn();
 	if (!ret)
 		ret = get_last_cap();
-	if (!ret)
-		ret = kerndat_has_memfd_create();
 
 	return ret;
 }
@@ -270,6 +268,8 @@ int kerndat_init_rst(void)
 	ret = tcp_read_sysctl_limits();
 	if (!ret)
 		ret = get_last_cap();
+	if (!ret)
+		ret = kerndat_has_memfd_create();
 
 	return ret;
 }
-- 
1.9.3



More information about the CRIU mailing list