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:
parent
c4269c63a2
commit
5ee9fe6ba1
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user