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 <rppt@linux.vnet.ibm.com>
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Mike Rapoport 2017-06-28 15:49:13 +03:00 committed by Andrei Vagin
parent 627ca7d13d
commit 0aa9cc3641

View file

@ -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;