From 30761e835c7b8720c8ea9316b44bcf39be49d93d Mon Sep 17 00:00:00 2001 From: "Serge E. Hallyn" Date: Mon, 9 Mar 2009 14:28:38 -0500 Subject: [PATCH] s390 sys_clone is backwards Switch the flags and sp for sys_clone for s390. Without this, lxc-execute gets a segfault on clone (of course). With this, it succeeds. Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- src/lxc/lxc_namespace.h | 4 +++- src/lxc/namespace.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_namespace.h b/src/lxc/lxc_namespace.h index 3bef4a8fe..ec51cb4b9 100644 --- a/src/lxc/lxc_namespace.h +++ b/src/lxc/lxc_namespace.h @@ -60,8 +60,10 @@ # error "unsupported architecture" # endif #endif -#if __i386__ || __x86_64__ || __s390__ || __powerpc__ +#if __i386__ || __x86_64__ || __powerpc__ # define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL) +#elif __s390__ +# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD) #elif __ia64__ # define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL) #else diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h index 405936864..004af4bf8 100644 --- a/src/lxc/namespace.h +++ b/src/lxc/namespace.h @@ -60,8 +60,10 @@ # error "unsupported architecture" # endif #endif -#if __i386__ || __x86_64__ || __s390__ || __powerpc__ +#if __i386__ || __x86_64__ || __powerpc__ # define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL); +#elif __s390__ +# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD) #elif __ia64__ # define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL); #else