[CRIU] [PATCH] vdso: No need to fetch pfn if marked vdso area has been met

Cyrill Gorcunov gorcunov at openvz.org
Fri May 24 07:33:30 EDT 2013


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---

Pavel, this is worth to have even without parasite_fixup_vdso reworked
(addressing your comment).

 parasite-syscall.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/parasite-syscall.c b/parasite-syscall.c
index d668e9c..60c48ed 100644
--- a/parasite-syscall.c
+++ b/parasite-syscall.c
@@ -554,6 +554,17 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
 			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);
 		if (lseek(fd, off, SEEK_SET) != off) {
 			pr_perror("Failed to seek address %lx\n", vma->vma.start);
@@ -572,17 +583,6 @@ int parasite_fixup_vdso(struct parasite_ctl *ctl, pid_t pid,
 		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.
 		 */
 		if (pfn == vdso_pfn) {
-- 
1.8.1.4



More information about the CRIU mailing list