diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-05-08 21:45:27 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-05-08 21:45:27 +0000 |
commit | 51bed6ee1508cdbb8390f51f28570870cc923a4a (patch) | |
tree | d72b2d1f5a7d449dd231886190ce0a604bb586de /sys/arch/sparc | |
parent | 95cc7951e21c10ef48ecd8f2294bd551e30a74c1 (diff) |
In pmap_enu*(), be sure to splx() on low memory conditions.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 5662f1e2f42..956305c6bc4 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.136 2003/12/20 00:49:46 miod Exp $ */ +/* $OpenBSD: pmap.c,v 1.137 2004/05/08 21:45:26 miod Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -5084,8 +5084,10 @@ pmap_enu4_4c(pm, va, prot, flags, pv, pteproto) int size = NSEGRG * sizeof (struct segmap); sp = malloc((u_long)size, M_VMPMAP, M_NOWAIT); - if (sp == NULL) + if (sp == NULL) { + splx(s); return (ENOMEM); + } qzero((caddr_t)sp, size); rp->rg_segmap = sp; rp->rg_nsegmap = 0; @@ -5099,8 +5101,10 @@ pmap_enu4_4c(pm, va, prot, flags, pv, pteproto) int size = NPTESG * sizeof *pte; pte = malloc((u_long)size, M_VMPMAP, M_NOWAIT); - if (pte == NULL) + if (pte == NULL) { + splx(s); return (ENOMEM); + } #ifdef DEBUG if (sp->sg_pmeg != seginval) panic("pmap_enter: new ptes, but not seginval"); @@ -5426,8 +5430,10 @@ pmap_enu4m(pm, va, prot, flags, pv, pteproto) int size = NSEGRG * sizeof (struct segmap); sp = malloc((u_long)size, M_VMPMAP, M_NOWAIT); - if (sp == NULL) + if (sp == NULL) { + splx(s); return (ENOMEM); + } qzero((caddr_t)sp, size); rp->rg_segmap = sp; rp->rg_nsegmap = 0; @@ -5439,8 +5445,10 @@ pmap_enu4m(pm, va, prot, flags, pv, pteproto) int i, *ptd; ptd = pool_get(&L23_pool, PR_NOWAIT); - if (ptd == NULL) + if (ptd == NULL) { + splx(s); return (ENOMEM); + } rp->rg_seg_ptps = ptd; for (i = 0; i < SRMMU_L2SIZE; i++) @@ -5455,8 +5463,10 @@ pmap_enu4m(pm, va, prot, flags, pv, pteproto) int i; pte = pool_get(&L23_pool, PR_NOWAIT); - if (pte == NULL) + if (pte == NULL) { + splx(s); return (ENOMEM); + } sp->sg_pte = pte; sp->sg_npte = 1; |