[CRIU] [PATCH] sysctl: restore sysctl-vs synchronously

Andrey Vagin avagin at openvz.org
Wed Oct 28 07:28:02 PDT 2015


From: Andrew Vagin <avagin at openvz.org>

CRIU sets kernel/sem_next_id to retore semaphores and
this sysctl should be set berore semget().

(00.550616)      1: UNS: calling 0x443f70 (15, 1)
(00.551077)      1: Error (ipc_ns.c:573): Failed to restore sem id (0 instead of 65536)
(00.551251)      1: Error (ipc_ns.c:627): Failed to prepare semaphores set

Cc: Cyrill Gorcunov <gorcunov at openvz.org>
Cc: Tycho Andersen <tycho.andersen at canonical.com>
Reported-by: Cyrill Gorcunov <gorcunov at openvz.org>
Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysctl.c b/sysctl.c
index 489c599..f3ff175 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -457,7 +457,7 @@ int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns)
 	if (fd < 0)
 		return -1;
 
-	ret = userns_call(__userns_sysctl_op, UNS_ASYNC, userns_req, MAX_UNSFD_MSG_SIZE, fd);
+	ret = userns_call(__userns_sysctl_op, 0, userns_req, MAX_UNSFD_MSG_SIZE, fd);
 	close(fd);
 	return ret;
 }
-- 
2.4.3



More information about the CRIU mailing list