From b1ac97973c8ad7223cf22741ba95f23861b659bf Mon Sep 17 00:00:00 2001 From: chs Date: Wed, 19 Sep 2001 07:54:48 +0000 Subject: [PATCH] Fix kern/13049: missing unlock on failure exit from pmap_enter() --- sys/arch/pc532/pc532/pmap.c | 5 +++-- sys/arch/sh3/sh3/pmap.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/arch/pc532/pc532/pmap.c b/sys/arch/pc532/pc532/pmap.c index dd4d0c4c9620..00cce067dbef 100644 --- a/sys/arch/pc532/pc532/pmap.c +++ b/sys/arch/pc532/pc532/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.65 2001/09/15 20:36:34 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.66 2001/09/19 07:54:49 chs Exp $ */ /* * @@ -2539,7 +2539,8 @@ pmap_enter(pmap, va, pa, prot, flags) ptp = pmap_get_ptp(pmap, pdei(va)); if (ptp == NULL) { if (flags & PMAP_CANFAIL) { - return ENOMEM; + error = ENOMEM; + goto out; } panic("pmap_enter: get ptp failed"); } diff --git a/sys/arch/sh3/sh3/pmap.c b/sys/arch/sh3/sh3/pmap.c index 936cdf21a2d7..ab65e8b6a25e 100644 --- a/sys/arch/sh3/sh3/pmap.c +++ b/sys/arch/sh3/sh3/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.27 2001/09/15 20:36:34 chs Exp $ */ +/* $NetBSD: pmap.c,v 1.28 2001/09/19 07:54:48 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -3159,7 +3159,8 @@ pmap_enter(pmap, va, pa, prot, flags) ptp = pmap_get_ptp(pmap, pdei(va), FALSE); if (ptp == NULL) { if (flags & PMAP_CANFAIL) { - return ENOMEM; + error = ENOMEM; + goto out; } panic("pmap_enter: get ptp failed"); }