[CRIU] [PATCH] vdso: Get pagemap entries with pread call
Pavel Emelyanov
xemul at parallels.com
Thu Feb 13 04:56:28 PST 2014
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
arch/x86/vdso.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/x86/vdso.c b/arch/x86/vdso.c
index fe55af4..0a59e23 100644
--- a/arch/x86/vdso.c
+++ b/arch/x86/vdso.c
@@ -136,14 +136,7 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
}
off = (vma->e->start / PAGE_SIZE) * sizeof(u64);
- if (lseek(fd, off, SEEK_SET) != off) {
- pr_perror("Failed to seek address %lx\n",
- (long unsigned int)vma->e->start);
- ret = -1;
- goto err;
- }
-
- ret = read(fd, &pfn, sizeof(pfn));
+ ret = pread(fd, &pfn, sizeof(pfn), off);
if (ret < 0 || ret != sizeof(pfn)) {
pr_perror("Can't read pme for pid %d", pid);
ret = -1;
--
1.8.4.2
More information about the CRIU
mailing list