diff options
-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)); |