Commit f3908041 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

sysctl: restore sysctl-vs synchronously

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@openvz.org>
Cc: Tycho Andersen <tycho.andersen@canonical.com>
Reported-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ceebb41d
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment