]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix ia64 clone
authorDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 5 Jan 2012 21:45:32 +0000 (22:45 +0100)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 5 Jan 2012 21:45:32 +0000 (22:45 +0100)
Fix the stack address for ia64.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/namespace.c

index aca29d4f87aa37c4133fe98f38c1b3296b153e66..6512685d0ec455519100343588774e1d938b9fca 100644 (file)
@@ -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));