From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH] s390 sys_clone is backwards
Date: Mon, 9 Mar 2009 14:28:38 -0500 [thread overview]
Message-ID: <20090309192838.GA25727@us.ibm.com> (raw)
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
next reply other threads:[~2009-03-09 19:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-09 19:28 Serge E. Hallyn [this message]
[not found] ` <20090309192838.GA25727-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-09 19:47 ` [PATCH] s390 sys_clone is backwards Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090309192838.GA25727@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox