[CRIU] [PATCH] compel: Print why memfd()-ing task fails

Andrei Vagin avagin at virtuozzo.com
Tue Apr 4 18:07:37 PDT 2017


Applied
On Mon, Apr 03, 2017 at 09:08:40PM +0300, Pavel Emelyanov wrote:
> 
> Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
> 
> ---
>  compel/src/lib/infect.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
> index c0b05e3..7f6d2f3 100644
> --- a/compel/src/lib/infect.c
> +++ b/compel/src/lib/infect.c
> @@ -747,8 +747,11 @@ static int parasite_memfd_exchange(struct parasite_ctl *ctl, unsigned long size)
>  	fd = (int)(long)sret;
>  	if (fd == -ENOSYS)
>  		return 1;
> -	if (fd < 0)
> +	if (fd < 0) {
> +		errno = -fd;
> +		pr_perror("Can't create memfd in victim");
>  		return fd;
> +	}
>  
>  	ctl->map_length = round_up(size, page_size());
>  	lfd = ctl->ictx.open_proc(ctl->rpid, O_RDWR, "fd/%d", fd);
> -- 
> 2.5.5
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list