diff options
author | alc <alc@FreeBSD.org> | 2002-03-17 07:01:42 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-03-17 07:01:42 +0000 |
commit | 16a0e1c32c8a8478b76d7a036d7a0df1d85c9305 (patch) | |
tree | 4662851f9eaff15d22d84be0cc5d4a593d10e5c0 /sys/vm/vm_glue.c | |
parent | 093fe76cadc93fc0ce28b555ed520934d0d3fe7e (diff) | |
download | FreeBSD-src-16a0e1c32c8a8478b76d7a036d7a0df1d85c9305.zip FreeBSD-src-16a0e1c32c8a8478b76d7a036d7a0df1d85c9305.tar.gz |
Undo part of revision 1.57: Now that (o)sendsig() doesn't call useracc(),
the motivation for saving and restoring the map->hint in useracc() is gone.
(The same tests that motivated this change in revision 1.57 now show that
there is no performance loss from removing it.) This was really a hack and
some day we would have had to add new synchronization here on map->hint
to maintain it.
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r-- | sys/vm/vm_glue.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 3263180..75bd9b42 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -139,8 +139,6 @@ useracc(addr, len, rw) { boolean_t rv; vm_prot_t prot; - vm_map_t map; - vm_map_entry_t save_hint; GIANT_REQUIRED; @@ -160,17 +158,9 @@ useracc(addr, len, rw) || (vm_offset_t) addr + len < (vm_offset_t) addr) { return (FALSE); } - map = &curproc->p_vmspace->vm_map; - - /* - * We save the map hint, and restore it. Useracc appears to distort - * the map hint unnecessarily. - */ - save_hint = map->hint; - rv = vm_map_check_protection(map, - trunc_page((vm_offset_t)addr), round_page((vm_offset_t)addr + len), prot); - map->hint = save_hint; - + rv = vm_map_check_protection(&curproc->p_vmspace->vm_map, + trunc_page((vm_offset_t)addr), round_page((vm_offset_t)addr + len), + prot); return (rv == TRUE); } |