aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-07-29 14:22:38 -0400
committerIngo Molnar <mingo@kernel.org>2012-07-30 05:27:22 -0400
commit89133786f9408d53361874a8c784fff150fc7f7c (patch)
treecde422d462e963b5128ea4f103e77b2d806fdc9f /mm/mmap.c
parent6dab3cc078e3da0d26534410bc9e018a17031d95 (diff)
uprobes: Remove insert_vm_struct()->uprobe_mmap()
Remove insert_vm_struct()->uprobe_mmap(). It is not needed, nobody except arch/ia64/kernel/perfmon.c uses insert_vm_struct(vma) with vma->vm_file != NULL. And it is wrong. Again, get_user_pages() can not succeed before vma_link(vma) makes is visible to find_vma(). And even if this worked, we must not insert the new bp before this mapping is visible to vma_prio_tree_foreach() for uprobe_unregister(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Srikar Dronamraju <srikar.vnet.ibm.com> Cc: Anton Arapov <anton@redhat.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/20120729182238.GA20349@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index e5a46149d1f1..4fe2697339ed 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2345,9 +2345,6 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
2345 security_vm_enough_memory_mm(mm, vma_pages(vma))) 2345 security_vm_enough_memory_mm(mm, vma_pages(vma)))
2346 return -ENOMEM; 2346 return -ENOMEM;
2347 2347
2348 if (vma->vm_file && uprobe_mmap(vma))
2349 return -EINVAL;
2350
2351 vma_link(mm, vma, prev, rb_link, rb_parent); 2348 vma_link(mm, vma, prev, rb_link, rb_parent);
2352 return 0; 2349 return 0;
2353} 2350}