summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-07-21 15:24:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-07-21 15:24:03 -0700
commit490fc053865c9cc40f1085ef8a5504f5341f79d2 (patch)
tree95f2e6e189cdae1a5e638b7ea4e39502605eaaa8 /arch/ia64/kernel
parent95faf6992df468f617edb788da8c21c6eed0dfa7 (diff)
downloadlinux-stable-490fc053865c9cc40f1085ef8a5504f5341f79d2.tar.gz
linux-stable-490fc053865c9cc40f1085ef8a5504f5341f79d2.tar.bz2
linux-stable-490fc053865c9cc40f1085ef8a5504f5341f79d2.zip
mm: make vm_area_alloc() initialize core fields
Like vm_area_dup(), it initializes the anon_vma_chain head, and the basic mm pointer. The rest of the fields end up being different for different users, although the plan is to also initialize the 'vm_ops' field to a dummy entry. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r--arch/ia64/kernel/perfmon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index e859246badca..46bff1661836 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2278,17 +2278,15 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t
DPRINT(("smpl_buf @%p\n", smpl_buf));
/* allocate vma */
- vma = vm_area_alloc();
+ vma = vm_area_alloc(mm);
if (!vma) {
DPRINT(("Cannot allocate vma\n"));
goto error_kmem;
}
- INIT_LIST_HEAD(&vma->anon_vma_chain);
/*
* partially initialize the vma for the sampling buffer
*/
- vma->vm_mm = mm;
vma->vm_file = get_file(filp);
vma->vm_flags = VM_READ|VM_MAYREAD|VM_DONTEXPAND|VM_DONTDUMP;
vma->vm_page_prot = PAGE_READONLY; /* XXX may need to change */