2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

pid: Check for equality of getpid() of child to last_level_pid

Make the sanity check working in case of mutli-level pids.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2017-05-05 19:19:41 +03:00
committed by Andrei Vagin
parent 3306436349
commit 514318dd7a

View File

@@ -1738,8 +1738,9 @@ static int restore_task_with_children(void *_arg)
goto err; goto err;
pid = getpid(); pid = getpid();
if (vpid(current) != pid) { if (last_level_pid(current->pid) != pid) {
pr_err("Pid %d do not match expected %d\n", pid, vpid(current)); pr_err("Pid %d do not match expected %d (task %d)\n",
pid, last_level_pid(current->pid), vpid(current));
set_task_cr_err(EEXIST); set_task_cr_err(EEXIST);
goto err; goto err;
} }