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

Andrey Vagin avagin at openvz.org
Tue May 13 04:39:28 PDT 2014


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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index d79da59..897c3fc 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -260,7 +260,7 @@ static int map_private_vma(pid_t pid, struct vma_area *vma, void **tgt_addr,
 
 		pr_info("COW 0x%016"PRIx64"-0x%016"PRIx64" 0x%016"PRIx64" vma\n",
 			vma->e->start, vma->e->end, vma->e->pgoff);
-		paddr = decode_pointer(vma->premmaped_addr);
+		paddr = decode_pointer(p->premmaped_addr);
 	}
 
 	*pvma = p;
-- 
1.8.5.3



More information about the CRIU mailing list