Commit 4b37d0b0 authored by Andrey Vagin's avatar Andrey Vagin Committed by Andrei Vagin

restore: check a return code of RUN_CLONE_RESTORE_FN

Otherwise we can skip an error and then criu will hang on switching to
the next stage.
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 53d29d7e
...@@ -1554,6 +1554,10 @@ long __export_restore_task(struct task_restore_args *args) ...@@ -1554,6 +1554,10 @@ long __export_restore_task(struct task_restore_args *args)
*/ */
RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, thread_args, args->clone_restore_fn); RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, thread_args, args->clone_restore_fn);
if (ret != thread_args[i].pid - 1) {
pr_err("Unable to create a thread: %ld", ret);
goto core_restore_end;
}
} }
ret = sys_flock(fd, LOCK_UN); ret = sys_flock(fd, LOCK_UN);
......
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