Commit 14dbe3a7 authored by Mike Rapoport's avatar Mike Rapoport Committed by Andrei Vagin

lazy-pages: do not treat VMAs that have MAP_LOCKED as lazy

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

travis-ci: success for lazy-pages: misc fixes (rev3)
Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent a29f84a4
......@@ -129,6 +129,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)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment