Don't pass the kernel_pmap to pmap_fault_fixup() if the fault comes from

kernel mode, always use the curthread pmap instead. There are valid cases
were we can fault on a user address from the kernel without pcb_onfault
being set.

Approved by:	re (blanket)
This commit is contained in:
cognet 2005-06-16 13:21:52 +00:00
parent 02006202bd
commit 6a3b6acd65

View File

@ -406,8 +406,8 @@ data_abort_handler(trapframe_t *tf)
#ifdef DEBUG
last_fault_code = fsr;
#endif
if (pmap_fault_fixup(user ? vmspace_pmap(td->td_proc->p_vmspace) :
kernel_pmap, va, ftype, user)) {
if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype,
user)) {
goto out;
}