[CRIU] [PATCH] restore: die properly if restore_one_task fails

Andrew Vagin avagin at parallels.com
Fri Aug 29 03:26:59 PDT 2014


On Thu, Aug 28, 2014 at 06:14:51PM +0000, Tycho Andersen wrote:
> This is really just the last bit of c32046c9; if restore_one_task() fails, we
> need to do the same futex wakeup we do everywhere else in this function.
> 

Acked-by: Andrew Vagin <avagin at parallels.com>

> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> ---
>  cr-restore.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index cefa78e..ec4b648 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1467,7 +1467,10 @@ static int restore_task_with_children(void *_arg)
>  	if (current->parent == NULL && fini_mnt_ns())
>  		goto err_fini_mnt;
>  
> -	return restore_one_task(current->pid.virt, ca->core);
> +	if (restore_one_task(current->pid.virt, ca->core))
> +		goto err_fini_mnt;
> +
> +	return 0;
>  
>  err_fini_mnt:
>  	if (current->parent == NULL)
> -- 
> 1.9.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list