diff options
author | 2012-01-05 22:45:32 +0100 | |
---|---|---|
committer | 2012-01-05 22:45:32 +0100 | |
commit | 92c64f7ed5663756f3c72fef4f38349111cb2d3f (patch) | |
tree | fe1afca96d98c383d0fdbea501bc65629d688192 | |
parent | Fix network cleanup on error (diff) | |
download | lxc-92c64f7ed5663756f3c72fef4f38349111cb2d3f.tar.gz lxc-92c64f7ed5663756f3c72fef4f38349111cb2d3f.tar.bz2 lxc-92c64f7ed5663756f3c72fef4f38349111cb2d3f.zip |
Fix ia64 clone
Fix the stack address for ia64.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r-- | src/lxc/namespace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxc/namespace.c b/src/lxc/namespace.c index aca29d4..6512685 100644 --- a/src/lxc/namespace.c +++ b/src/lxc/namespace.c @@ -67,14 +67,14 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int flags) }; long stack_size = sysconf(_SC_PAGESIZE); - void *stack = alloca(stack_size) + stack_size; + void *stack = alloca(stack_size); pid_t ret; #ifdef __ia64__ ret = __clone2(do_clone, stack, stack_size, flags | SIGCHLD, &clone_arg); #else - ret = clone(do_clone, stack, flags | SIGCHLD, &clone_arg); + ret = clone(do_clone, stack + stack_size, flags | SIGCHLD, &clone_arg); #endif if (ret < 0) ERROR("failed to clone(0x%x): %s", flags, strerror(errno)); |