* [PATCH] s390 sys_clone is backwards
@ 2009-03-09 19:28 Serge E. Hallyn
[not found] ` <20090309192838.GA25727-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Serge E. Hallyn @ 2009-03-09 19:28 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Linux Containers
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 <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
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 3bef4a8..ec51cb4 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 4059368..004af4b 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
--
1.6.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-09 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 19:28 [PATCH] s390 sys_clone is backwards Serge E. Hallyn
[not found] ` <20090309192838.GA25727-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-09 19:47 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox