[CRIU] [PATCH] restore: Report error number if PR_SET_MM failed

Andrey Vagin avagin at virtuozzo.com
Wed Dec 7 00:31:23 PST 2016


On Tue, Dec 06, 2016 at 10:25:21PM +0300, Cyrill Gorcunov wrote:
> Reported-by: Andrei Vagin <avagin at virtuozzo.com>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  criu/pie/restorer.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
> index c837656379d3..764a5e6995b6 100644
> --- a/criu/pie/restorer.c
> +++ b/criu/pie/restorer.c
> @@ -1378,8 +1378,11 @@ skip_vdso:
>  		 * new ones from image file.
>  		 */
>  		ret |= restore_self_exe_late(args);
> -	} else
> +	} else {
> +		if (ret)
> +			pr_err("sys_prctl(PR_SET_MM, PR_SET_MM_MAP) failed with %d\n", (int)ret);
>  		sys_close(args->fd_exe_link);
> +	}
>  
>  	if (ret)

I think it will be better to print an error here. What do you think?
>  		goto core_restore_end;
> -- 
> 2.7.4
> 


More information about the CRIU mailing list