summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-11-14 22:56:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-11-14 22:56:57 +0000
commitcffe5c052bb6a0cb72b83f6abe81b5662497d569 (patch)
treeda73d680759ea8f3b08acdb89523bc123d9c916f /sys/arch/m88k
parenta8981f6795b84c8edb0d66df1dce14f645aca32e (diff)
When processing a data access fault, keep the kernel lock while invoking
data_access_emulation() to complete the interrupted pipeline operations, as data_access_emulation() can fault in turn.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/m88k/trap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c
index fda565353e8..5e0d171ccc0 100644
--- a/sys/arch/m88k/m88k/trap.c
+++ b/sys/arch/m88k/m88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.41 2007/10/28 10:18:53 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.42 2007/11/14 22:56:56 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -392,10 +392,6 @@ user_fault:
else if (result == EACCES)
result = EFAULT;
}
- if (type == T_DATAFLT)
- KERNEL_UNLOCK();
- else
- KERNEL_PROC_UNLOCK(p);
/*
* This could be a fault caused in copyin*()
@@ -438,6 +434,10 @@ user_fault:
fault_type = result == EACCES ?
BUS_ADRERR : SEGV_MAPERR;
}
+ if (type == T_DATAFLT)
+ KERNEL_UNLOCK();
+ else
+ KERNEL_PROC_UNLOCK(p);
break;
case T_MISALGNFLT+T_USER:
/* Fix any misaligned ld.d or st.d instructions */