diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 10:39:12 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-10 10:39:12 +0000 |
commit | ec487e0fec6d902a855b755198257c7367a5661b (patch) | |
tree | 78456accf947459353145350b612e0efe64be8b1 | |
parent | 9b16af7f254ad018fb7ff8872ae57f62714ece01 (diff) |
Don't crash in pgt_page_alloc if uvm_km_kmemalloc fails.
(we'll crash somewhere else anyway, but that's a later problem).
-rw-r--r-- | sys/arch/sparc/sparc/pmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc/sparc/pmap.c b/sys/arch/sparc/sparc/pmap.c index 3ddc704cba4..f888aed818d 100644 --- a/sys/arch/sparc/sparc/pmap.c +++ b/sys/arch/sparc/sparc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.83 2001/05/10 10:34:48 art Exp $ */ +/* $OpenBSD: pmap.c,v 1.84 2001/05/10 10:39:11 art Exp $ */ /* $NetBSD: pmap.c,v 1.118 1998/05/19 19:00:18 thorpej Exp $ */ /* @@ -251,7 +251,7 @@ pgt_page_alloc(sz, flags, mtype) p = (caddr_t)uvm_km_kmemalloc(kernel_map, uvm.kernel_object, (vsize_t)sz, UVM_KMF_NOWAIT); - if ((cpuinfo.flags & CPUFLG_CACHEPAGETABLES) == 0) { + if (p != NULL && ((cpuinfo.flags & CPUFLG_CACHEPAGETABLES) == 0)) { pcache_flush(p, (caddr_t)VA2PA(p), sz); kvm_uncache(p, atop(sz)); } |