mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: Russell King <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Andrea Arcangeli <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a3bf6ce366
commit
a670468f5e
6 changed files with 7 additions and 10 deletions
|
|
@ -2504,7 +2504,6 @@ void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol)
|
|||
goto put_new;
|
||||
|
||||
/* Create pseudo-vma that contains just the policy */
|
||||
memset(&pvma, 0, sizeof(struct vm_area_struct));
|
||||
vma_init(&pvma, NULL);
|
||||
pvma.vm_end = TASK_SIZE; /* policy covers entire file */
|
||||
mpol_set_shared_policy(sp, &pvma, new); /* adds ref */
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,6 @@ static void shmem_pseudo_vma_init(struct vm_area_struct *vma,
|
|||
struct shmem_inode_info *info, pgoff_t index)
|
||||
{
|
||||
/* Create a pseudo vma that just contains the policy */
|
||||
memset(vma, 0, sizeof(*vma));
|
||||
vma_init(vma, NULL);
|
||||
/* Bias interleave by inode number to distribute better across nodes */
|
||||
vma->vm_pgoff = index + info->vfs_inode.i_ino;
|
||||
|
|
|
|||
Loading…
Reference in a new issue