Commit 001be2ab authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

vdso: No need to fetch pfn if marked vdso area has been met

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e7c64ae1
...@@ -554,6 +554,17 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid, ...@@ -554,6 +554,17 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
goto err; goto err;
} }
/*
* Defer handling marked vdso.
*/
if (unlikely(args->is_marked)) {
BUG_ON(args->proxy_addr == VDSO_BAD_ADDR);
BUG_ON(marked);
marked = vma;
proxy_addr = args->proxy_addr;
continue;
}
off = (vma->vma.start / PAGE_SIZE) * sizeof(u64); off = (vma->vma.start / PAGE_SIZE) * sizeof(u64);
if (lseek(fd, off, SEEK_SET) != off) { if (lseek(fd, off, SEEK_SET) != off) {
pr_perror("Failed to seek address %lx\n", vma->vma.start); pr_perror("Failed to seek address %lx\n", vma->vma.start);
...@@ -571,17 +582,6 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid, ...@@ -571,17 +582,6 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
pfn = PME_PFRAME(pfn); pfn = PME_PFRAME(pfn);
BUG_ON(!pfn); BUG_ON(!pfn);
/*
* Defer handling marked vdso.
*/
if (unlikely(args->is_marked)) {
BUG_ON(args->proxy_addr == VDSO_BAD_ADDR);
BUG_ON(marked);
marked = vma;
proxy_addr = args->proxy_addr;
continue;
}
/* /*
* Set proper VMA statuses. * Set proper VMA statuses.
*/ */
......
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