[CRIU] [PATCH] pstree: fix prepare_dummy_pstree after rework of PID namespace

Kirill Tkhai ktkhai at virtuozzo.com
Wed Jun 28 18:23:01 MSK 2017


On 28.06.2017 15:49, Mike Rapoport wrote:
> 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 at linux.vnet.ibm.com>

Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>

> ---
>  criu/pstree.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/criu/pstree.c b/criu/pstree.c
> index 9ae1912..cf24c99 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;
>  
> 


More information about the CRIU mailing list