From 0aa9cc36416143bc4601db073b090bbca5378efe Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 28 Jun 2017 15:49:13 +0300 Subject: [PATCH] pstree: fix prepare_dummy_pstree after rework of PID namespace Since commit 84eedc49a (pstree: Make lookup_create_pid() able to create tasks with pid->level > 1) the read_pstree_image function presumes that namespaces image is already parsed. This patch ensures that this is the case for prepare_dummy_pstree users. Signed-off-by: Mike Rapoport Reviewed-by: Kirill Tkhai Signed-off-by: Andrei Vagin --- criu/pstree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/criu/pstree.c b/criu/pstree.c index 9ae191292..cf24c990c 100644 --- a/criu/pstree.c +++ b/criu/pstree.c @@ -1416,6 +1416,9 @@ int prepare_dummy_pstree(void) if (prepare_task_entries() == -1) return -1; + if (read_ns_with_hookups()) + return -1; + if (read_pstree_image(&dummy) == -1) return -1;