[CRIU] [PATCH] parasite: stack must be initialized by highest address
Andrey Vagin
avagin at openvz.org
Tue Nov 5 06:28:27 PST 2013
Stack grows down on x86 and ARM
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
parasite-syscall.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/parasite-syscall.c b/parasite-syscall.c
index 352b7e7..133afeb 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -1178,13 +1178,12 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
ctl->sigframe = ctl->local_map + p;
p += RESTORE_STACK_SIGFRAME;
-
- ctl->rstack = ctl->remote_map + p;
p += PARASITE_STACK_SIZE;
+ ctl->rstack = ctl->remote_map + p;
if (item->nr_threads > 1) {
- ctl->r_thread_stack = ctl->remote_map + p;
p += PARASITE_STACK_SIZE;
+ ctl->r_thread_stack = ctl->remote_map + p;
}
if (parasite_start_daemon(ctl, item))
--
1.8.3.1
More information about the CRIU
mailing list