[CRIU] [PATCH] mem: fix typo in determining an address of parent vma

Andrew Vagin avagin at parallels.com
Tue May 13 04:36:45 PDT 2014


Sorry, pls ignore.

This patch contains debug messages.

On Tue, May 13, 2014 at 03:32:53PM +0400, Andrey Vagin wrote:
> Look at this hunk from 7659c995f58f:
> -    paddr = decode_pointer(vma_premmaped_start(&p->vma));
> +    paddr = decode_pointer(vma->premmaped_addr);
> 
> Obviously we want to use p->premmaped_addr instead of
> vma->premmaped_addr.
> 
> Fixes: 7659c995f58f ("vm: don't overwrite vma->shmid for private mappings")
> Reported-by: Filipe Brandenburger <filbranden at google.com>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 1c67a20..2601c0c 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -238,7 +238,8 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void *tgt_addr,
>  		    p->vma.start == vma->vma.start) {
>  			pr_info("COW 0x%016"PRIx64"-0x%016"PRIx64" 0x%016"PRIx64" vma\n",
>  				vma->vma.start, vma->vma.end, vma->vma.pgoff);
> -			paddr = decode_pointer(vma->premmaped_addr);
> +			paddr = decode_pointer(p->premmaped_addr);
> +			pr_err("%p %p\n", vma, decode_pointer(vma->premmaped_addr));
>  			break;
>  		}
>  
> @@ -291,6 +292,7 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void *tgt_addr,
>  	}
>  
>  	vma->premmaped_addr = (unsigned long) addr;
> +	pr_err("%p %p\n", vma, decode_pointer(vma->premmaped_addr));
>  	pr_debug("\tpremap 0x%016"PRIx64"-0x%016"PRIx64" -> %016lx\n",
>  		vma->vma.start, vma->vma.end, (unsigned long)addr);
>  
> -- 
> 1.8.5.3
> 


More information about the CRIU mailing list