[CRIU] [PATCH v3 2/5] lazy-pages: do not treat VMAs that have MAP_LOCKED as lazy

Mike Rapoport mike.rapoport at gmail.com
Wed Nov 2 16:01:45 PDT 2016


When a VMA is mapped with MAP_LOCKED it is address space is populated with
pages which causes UFFDIO_COPY to return -EXISTS. Until we can find some
better solution let's avoid marking VMAs with MAP_LOCKED as lazy.

Fixes: #238

Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
 criu/include/vma.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/criu/include/vma.h b/criu/include/vma.h
index 1962862..f6df707 100644
--- a/criu/include/vma.h
+++ b/criu/include/vma.h
@@ -120,6 +120,7 @@ static inline bool vma_entry_can_be_lazy(VmaEntry *e)
 {
 	return ((e->flags & MAP_ANONYMOUS) &&
 		(e->flags & MAP_PRIVATE) &&
+		!(e->flags & MAP_LOCKED) &&
 		!(vma_entry_is(e, VMA_AREA_VDSO)) &&
 		!(vma_entry_is(e, VMA_AREA_VSYSCALL)));
 }
-- 
1.9.1



More information about the CRIU mailing list