[PATCH] Add mm->task_size and fix powerpc vdso
[linux-2.6.git] / arch / powerpc / kernel / vdso.c
index b44b36e..04f7df3 100644 (file)
@@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
                        struct page *pg = virt_to_page(vdso32_kbase +
                                                       i*PAGE_SIZE);
                        struct page *upg = (vma && vma->vm_mm) ?
-                               follow_page(vma->vm_mm, vma->vm_start +
-                                           i*PAGE_SIZE, 0)
+                               follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
                                : NULL;
                        dump_one_vdso_page(pg, upg);
                }
@@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
                        struct page *pg = virt_to_page(vdso64_kbase +
                                                       i*PAGE_SIZE);
                        struct page *upg = (vma && vma->vm_mm) ?
-                               follow_page(vma->vm_mm, vma->vm_start +
-                                           i*PAGE_SIZE, 0)
+                               follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
                                : NULL;
                        dump_one_vdso_page(pg, upg);
                }
@@ -184,8 +182,8 @@ static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
        unsigned long offset = address - vma->vm_start;
        struct page *pg;
 #ifdef CONFIG_PPC64
-       void *vbase = test_thread_flag(TIF_32BIT) ?
-               vdso32_kbase : vdso64_kbase;
+       void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ?
+               vdso64_kbase : vdso32_kbase;
 #else
        void *vbase = vdso32_kbase;
 #endif