--- linux-2.6.13.1/arch/ppc64/kernel/vdso.c.ppccln 2005-09-13 15:47:26.000000000 +0400 +++ linux-2.6.13.1/arch/ppc64/kernel/vdso.c 2005-09-13 15:55:08.000000000 +0400 @@ -221,13 +221,13 @@ int arch_setup_additional_pages(struct l if (vdso_pages == 0) return 0; + vdso_base = -ENOMEM; vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); if (vma == NULL) - return -ENOMEM; - if (security_vm_enough_memory(vdso_pages)) { - kmem_cache_free(vm_area_cachep, vma); - return -ENOMEM; - } + goto out; + if (security_vm_enough_memory(vdso_pages)) + goto out_free; + memset(vma, 0, sizeof(*vma)); /* @@ -237,11 +237,8 @@ int arch_setup_additional_pages(struct l */ vdso_base = get_unmapped_area(NULL, vdso_base, vdso_pages << PAGE_SHIFT, 0, 0); - if (vdso_base & ~PAGE_MASK) { - vm_unacct_memory(vdso_pages); - kmem_cache_free(vm_area_cachep, vma); - return (int)vdso_base; - } + if (vdso_base & ~PAGE_MASK) + goto out_unacct; current->thread.vdso_base = vdso_base; @@ -274,6 +271,13 @@ int arch_setup_additional_pages(struct l up_write(&mm->mmap_sem); return 0; + +out_unacct: + vm_unacct_memory(vdso_pages); +out_free: + kmem_cache_free(vm_area_cachep, vma); +out: + return (int)vdso_base; } static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname,