diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-27 22:31:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-10-27 22:31:18 +0000 |
commit | c9f078c2e91060f3c3781ab2ab88042342ae1c67 (patch) | |
tree | 8feb09ba33da4f66ec0ee2aa42ac2e9ecae1107a | |
parent | 22bd45329d6acaa82d62c2bb8a8a7091cccf21bd (diff) |
Grab kernel lock for EXC_DSI.
Requested by deraadt@
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index dde75b48119..2b1694924b2 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.78 2007/04/26 21:36:32 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.79 2007/10/27 22:31:17 kettenis Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -314,8 +314,12 @@ trap(struct trapframe *frame) ftype = VM_PROT_READ | VM_PROT_WRITE; else ftype = VM_PROT_READ; - if (uvm_fault(map, trunc_page(va), 0, ftype) == 0) + KERNEL_LOCK(); + if (uvm_fault(map, trunc_page(va), 0, ftype) == 0) { + KERNEL_UNLOCK(); return; + } + KERNEL_UNLOCK(); if ((fb = p->p_addr->u_pcb.pcb_onfault)) { p->p_addr->u_pcb.pcb_onfault = 0; |