Commit 7051e2e9 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

util: apply PME_PFRAME_MASK to get pfn

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a90613cf
......@@ -38,6 +38,7 @@
#include "rst-malloc.h"
#include "image.h"
#include "vma.h"
#include "mem.h"
#include "cr_options.h"
#include "servicefd.h"
......@@ -636,8 +637,10 @@ int vaddr_to_pfn(unsigned long vaddr, u64 *pfn)
if (ret != sizeof(*pfn)) {
pr_perror("Can't read pme for pid %d", getpid());
ret = -1;
} else
} else {
*pfn &= PME_PFRAME_MASK;
ret = 0;
}
out:
close(fd);
return ret;
......
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