[CRIU] Re: [PATCH cr] cr-restore: exit if someone can not be
restored
Pavel Emelyanov
xemul at parallels.com
Tue Sep 25 07:55:10 EDT 2012
On 09/25/2012 02:37 PM, Andrey Vagin wrote:
> Forgot to handle an error path in a one place.
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> cr-restore.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index 9f3de99..d40c66b 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -892,6 +892,8 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts)
> pr_info("Wait until all tasks are restored\n");
> futex_wait_while_gt(&task_entries->nr_in_progress, 0);
> ret = (int)futex_get(&task_entries->nr_in_progress);
> + if (ret < 0)
> + goto out;
>
> futex_set_and_wake(&task_entries->nr_in_progress, task_entries->nr);
> futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE_SIGCHLD);
Applied
More information about the CRIU
mailing list