[CRIU] [PATCH] mm: do check on shared pages only if a vma is inherited

Andrey Vagin avagin at openvz.org
Tue Aug 13 11:11:38 EDT 2013


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 5c6e4bb..e5fac9f 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -352,7 +352,7 @@ static int restore_priv_vma_content(pid_t pid)
 			p = decode_pointer((off) * PAGE_SIZE +
 					vma_premmaped_start(&vma->vma));
 
-			if (memcmp(p, buf, PAGE_SIZE) == 0) {
+			if (vma->ppage_bitmap && memcmp(p, buf, PAGE_SIZE) == 0) {
 				nr_shared++;
 				continue;
 			}
-- 
1.8.3.1



More information about the CRIU mailing list