[CRIU] [PATCH] restore: mutate tgt_addr in map_private_vma

Cyrill Gorcunov gorcunov at gmail.com
Mon Mar 31 23:36:58 PDT 2014


On Mon, Mar 31, 2014 at 02:01:24PM -0700, Jamie Liu wrote:
> @@ -301,7 +301,7 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void *tgt_addr,
>  		vma->ppage_bitmap = p->page_bitmap;
>  
>  		addr = mremap(paddr, size, size,
> -				MREMAP_FIXED | MREMAP_MAYMOVE, tgt_addr);
> +				MREMAP_FIXED | MREMAP_MAYMOVE, *tgt_addr);
>  		if (addr != tgt_addr) {
>  			pr_perror("Unable to remap a private vma");
>  			return -1;

This addr != tgt_addr look suspicious, should not it be addr != *tgt_addr
Other than that -- looks good.


More information about the CRIU mailing list