--- arch/x86/vdso/vma.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) Index: linux-2.6.25-rc5-mm1/arch/x86/vdso/vma.c =================================================================== --- linux-2.6.25-rc5-mm1.orig/arch/x86/vdso/vma.c 2008-03-20 20:46:58.660511998 -0700 +++ linux-2.6.25-rc5-mm1/arch/x86/vdso/vma.c 2008-03-20 21:24:38.199506332 -0700 @@ -34,26 +34,23 @@ static inline void *var_ref(void *p, cha static int __init init_vdso_vars(void) { - int npages = (vdso_end - vdso_start + PAGE_SIZE - 1) / PAGE_SIZE; + unsigned long size = vdso_end - vdso_start; + int npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; int i; char *vbase; vdso_pages = kmalloc(sizeof(struct page *) * npages, GFP_KERNEL); if (!vdso_pages) goto oom; - for (i = 0; i < npages; i++) { - struct page *p; - p = alloc_page(GFP_KERNEL); - if (!p) - goto oom; - vdso_pages[i] = p; - copy_page(page_address(p), vdso_start + i*PAGE_SIZE); - } - vbase = vmap(vdso_pages, npages, 0, PAGE_KERNEL); + vbase = __alloc_vcompound(GFP_KERNEL, get_order(size)); if (!vbase) goto oom; + for (i = 0; i < npages; i++) + vdso_pages[i] = vmalloc_to_page(vbase + (i << PAGE_SHIFT)); + + memcpy(vbase, vdso_start, size); if (memcmp(vbase, "\177ELF", 4)) { printk("VDSO: I'm broken; not ELF\n"); vdso_enabled = 0;