summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-04-15 21:30:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-04-15 21:30:30 +0000
commit13dc686bf6e5764400215d905b223699ec372606 (patch)
treefe50d4229fb971435bc57d697436eb6574c0ae1c /sys/arch
parent61384037fa6e42ca393d6c5d5409850fa501e129 (diff)
two missing splx in error path; ok drahn
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/powerpc/pmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c
index 86c2b6fff00..b935a497686 100644
--- a/sys/arch/powerpc/powerpc/pmap.c
+++ b/sys/arch/powerpc/powerpc/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.112 2010/04/09 17:36:08 drahn Exp $ */
+/* $OpenBSD: pmap.c,v 1.113 2010/04/15 21:30:29 deraadt Exp $ */
/*
* Copyright (c) 2001, 2002, 2007 Dale Rahn.
@@ -573,13 +573,16 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
if (pted == NULL) {
pted = pool_get(&pmap_pted_pool, PR_NOWAIT | PR_ZERO);
if (pted == NULL) {
- if ((flags & PMAP_CANFAIL) == 0)
+ if ((flags & PMAP_CANFAIL) == 0) {
+ splx(s);
return ENOMEM;
+ }
panic("pmap_enter: failed to allocate pted");
}
error = pmap_vp_enter(pm, va, pted, flags);
if (error) {
pool_put(&pmap_pted_pool, pted);
+ splx(s);
return error;
}
}