mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +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:
committed by
Andrei Vagin
parent
3306436349
commit
514318dd7a
@@ -1738,8 +1738,9 @@ static int restore_task_with_children(void *_arg)
|
||||
goto err;
|
||||
|
||||
pid = getpid();
|
||||
if (vpid(current) != pid) {
|
||||
pr_err("Pid %d do not match expected %d\n", pid, vpid(current));
|
||||
if (last_level_pid(current->pid) != pid) {
|
||||
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);
|
||||
goto err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user