aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-internal.h
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2012-07-29 20:22:44 +0200
committerIngo Molnar <[email protected]>2012-07-30 11:27:24 +0200
commitf4d6dfe55115efe981b4b5f37183ddccaaa792f0 (patch)
tree2d81b1b5a17334895282b42de6134b4e2dcf9f24 /lib/mpi/mpi-internal.h
parentcb113b47d098185f3f1f67e8300d05ddce842b66 (diff)
uprobes: Fix register_for_each_vma()->vma_address() check
1. register_for_each_vma() checks that vma_address() == vaddr, but this is not enough. We should also ensure that vaddr >= vm_start, find_vma() guarantees "vaddr < vm_end" only. 2. After the prevous changes, register_for_each_vma() is the only reason why vma_address() has to return loff_t, all other users know that we have the valid mapping at this offset and thus the overflow is not possible. Change the code to use vaddr_to_offset() instead, imho this looks more clean/understandable and now we can change vma_address(). 3. While at it, remove the unnecessary type-cast. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Srikar Dronamraju <srikar.vnet.ibm.com> Cc: Anton Arapov <[email protected]> Cc: Srikar Dronamraju <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions