mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
pstree: Add pid_ns check in read_pstree_image
Sanity check, that we have pid_ns_id. As we dump pid_ns_id since ids are implemented, they must be always. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
729bda402b
commit
c9aa6f3548
@@ -576,6 +576,15 @@ static int read_pstree_image(pid_t *pid_max)
|
||||
ids = parent->ids;
|
||||
}
|
||||
|
||||
if (!ids || !ids->has_pid_ns_id) {
|
||||
/*
|
||||
* At least root_item must have ids, and pid_ns_id field
|
||||
* was populated since ids are introduced.
|
||||
*/
|
||||
pr_err("No pid_ns id\n");
|
||||
break;
|
||||
}
|
||||
|
||||
pi = lookup_create_item(e->pid);
|
||||
if (pi == NULL)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user