[CRIU] [PATCH] restore: Fix waited task pid
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Thu Jul 6 17:39:48 MSK 2017
On 07/06/2017 05:33 PM, Kirill Tkhai wrote:
> The pid must be taken relative to the parent pid namespace.
>
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
Acked-by: Pavel Tikhomirov <ptikhomirov 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, ¤t->children, sibling) {
> - pid_t pid = vpid(pi);
> + pid_t pid = pi->pid->ns[level-1].virt;
> int status;
>
> switch (pi->pid->state) {
>
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
More information about the CRIU
mailing list