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:
Olivier Houchard 2005-06-16 13:21:52 +00:00
parent ad7abe197d
commit a56da6d0d2

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