mm: zero out the vma in vma_init()
Rather than in vm_area_alloc(). To ensure that the various oddball stack-based vmas are in a good state. Some of the callers were zeroing them out, others were not. Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

zatwierdzone przez
Linus Torvalds

rodzic
a3bf6ce366
commit
a670468f5e
@@ -310,8 +310,9 @@ static struct kmem_cache *mm_cachep;
|
||||
|
||||
struct vm_area_struct *vm_area_alloc(struct mm_struct *mm)
|
||||
{
|
||||
struct vm_area_struct *vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
|
||||
struct vm_area_struct *vma;
|
||||
|
||||
vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
|
||||
if (vma)
|
||||
vma_init(vma, mm);
|
||||
return vma;
|
||||
|
Reference in New Issue
Block a user