uprobes: Don't recheck vma/f_mapping in write_opcode()
authorOleg Nesterov <oleg@redhat.com>
Sun, 29 Jul 2012 18:22:12 +0000 (20:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jul 2012 09:27:18 +0000 (11:27 +0200)
commitf403072c6108e15f319a4a5036b650c77760522c
tree196781f30871635b7c8fc702a7566b5ed09e525c
parent35d56ca9d401d9d0ac8d91e4db1485af5f38f6fd
uprobes: Don't recheck vma/f_mapping in write_opcode()

write_opcode() rechecks valid_vma() and ->f_mapping, this is
pointless. The caller, register_for_each_vma() or uprobe_mmap(),
has already done these checks under mmap_sem.

To clarify, uprobe_mmap() checks valid_vma() only, but we can
rely on build_probe_list(vm_file->f_mapping->host).

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/20120729182212.GA20304@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c