X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=mm%2Fmmap.c;h=4f5b5709136abbe6c08b306ac35ac92740cb04d8;hb=486bcc59f3083c54df7b67d1d69db81585632a8b;hp=0eb9894db6de6a0fa56caabbd1c002f0cea8e2c3;hpb=1c2e02750b992703a8a18634e08b04353face243;p=linux-2.6-omap-h63xx.git diff --git a/mm/mmap.c b/mm/mmap.c index 0eb9894db6d..4f5b5709136 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1040,12 +1040,11 @@ munmap_back: * specific mapper. the address has already been validated, but * not unmapped, but the maps are removed from the list. */ - vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); + vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); if (!vma) { error = -ENOMEM; goto unacct_error; } - memset(vma, 0, sizeof(*vma)); vma->vm_mm = mm; vma->vm_start = addr; @@ -1896,12 +1895,11 @@ unsigned long do_brk(unsigned long addr, unsigned long len) /* * create a vma struct for an anonymous mapping */ - vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); + vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); if (!vma) { vm_unacct_memory(len >> PAGE_SHIFT); return -ENOMEM; } - memset(vma, 0, sizeof(*vma)); vma->vm_mm = mm; vma->vm_start = addr;