summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-04-15 21:14:19 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-04-15 21:14:19 +0000
commit12e84b047121c2691fd674a590c1695108dce5ed (patch)
tree71091af1a3ad7fe83aed1a04498af618f2bb51e2 /sys/arch/sparc64
parent182fa5a050d9cc4f382dd7d1d799f90fa711345a (diff)
Add some missing splx()'s (and missing simple_unlock() no-ops) in pmap error
paths. Spotted by Mike Belopuhov.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/pmap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c
index a7648ced6ee..83c4d196574 100644
--- a/sys/arch/sparc64/sparc64/pmap.c
+++ b/sys/arch/sparc64/sparc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.68 2009/02/12 18:53:14 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.69 2010/04/15 21:14:18 kettenis Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
#undef NO_VCACHE /* Don't forget the locked TLB in dostart */
/*
@@ -2174,6 +2174,8 @@ pmap_enter(pm, va, pa, prot, flags)
if (!pmap_get_page(&pg, NULL, pm)) {
if ((flags & PMAP_CANFAIL) == 0)
panic("pmap_enter: no memory");
+ simple_unlock(&pm->pm_lock);
+ splx(s);
return (ENOMEM);
}
}
@@ -2325,6 +2327,8 @@ pmap_protect(pm, sva, eva, prot)
sva < roundup(ekdata, 4*MEG)) {
prom_printf("pmap_protect: va=%08x in locked TLB\r\n", sva);
OF_enter();
+ simple_unlock(&pm->pm_lock);
+ splx(s);
return;
}
@@ -3455,6 +3459,7 @@ pmap_remove_pv(pmap, va, pa)
* Sometimes UVM gets confused and calls pmap_remove() instead
* of pmap_kremove()
*/
+ splx(s);
return;
#ifdef DIAGNOSTIC
printf("pmap_remove_pv(%lx, %x, %x) not found\n", (u_long)pmap, (u_int)va, (u_int)pa);