2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

criu: don't abort criu in lookup_create_item()

Currently lookup_create_item() calls BUG_ON(), if it meets a thread.
We don't expect to meet a thread there, but if images contain incorrect
data, we can be in this situation in open_remap_dead_process().

(gdb) bt

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrei Vagin
2017-07-18 01:19:35 +03:00
parent e84443bb2b
commit c6b930b3ae

View File

@@ -612,7 +612,11 @@ struct pstree_item *lookup_create_item(pid_t *pid, int level, uint32_t ns_id)
node = lookup_create_pid(pid, level, NULL, ns_id);
if (!node)
return NULL;
BUG_ON(node->state == TASK_THREAD);
if (node->state == TASK_THREAD) {
pr_err("The %d node is used for a thread\n", *pid);
return NULL;
}
return node->item;
}