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.
This commit is contained in:
Alan Cox 2002-03-17 07:01:42 +00:00
parent c4269c63a2
commit 5ee9fe6ba1

View File

@ -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);
}