[CRIU] [PATCH] restore: Fix waited task pid

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jul 6 17:33:16 MSK 2017


The pid must be taken relative to the parent pid namespace.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/cr-restore.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 965770f48..e14fa0694 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1083,10 +1083,11 @@ static unsigned long task_entries_pos;
 
 static int wait_on_helpers_zombies(void)
 {
+	int level = current->pid->level;
 	struct pstree_item *pi;
 
 	list_for_each_entry(pi, &current->children, sibling) {
-		pid_t pid = vpid(pi);
+		pid_t pid = pi->pid->ns[level-1].virt;
 		int status;
 
 		switch (pi->pid->state) {



More information about the CRIU mailing list