Commit c4148d79 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

cr-restore: exit if someone can not be restored

Forgot to handle an error path in a one place.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f95ff79c
...@@ -892,6 +892,8 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts) ...@@ -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"); pr_info("Wait until all tasks are restored\n");
futex_wait_while_gt(&task_entries->nr_in_progress, 0); futex_wait_while_gt(&task_entries->nr_in_progress, 0);
ret = (int)futex_get(&task_entries->nr_in_progress); 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->nr_in_progress, task_entries->nr);
futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE_SIGCHLD); futex_set_and_wake(&task_entries->start, CR_STATE_RESTORE_SIGCHLD);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment