diff --git a/criu/pstree.c b/criu/pstree.c index 62b883d16..9ae607792 100644 --- a/criu/pstree.c +++ b/criu/pstree.c @@ -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;