[CRIU] [PATCH] restore: return -1 if fail

Ruslan Kuprieiev kupruser at gmail.com
Sat Sep 13 04:45:36 PDT 2014


On 12.09.2014 11:53, Ruslan Kuprieiev wrote:
> In cr_dump_tasks() we expect restore_root_task to return < 0 if
> error ocures.
>
> Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
> ---
>   cr-restore.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index 4d5ccd5..bfadf43 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1779,7 +1779,7 @@ out_kill:
>   out:
>   	__restore_switch_stage(CR_STATE_FAIL);
>   	pr_err("Restoring FAILED.\n");
> -	return 1;
> +	return -1;
>   }
>   
>   static int prepare_task_entries(void)
Without this patch criu returns 0 on failed restore and ruins scripts, 
like, for example, our security test.


More information about the CRIU mailing list