diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-30 20:09:27 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-07-30 20:09:27 +0000 |
commit | 8cb1194dd87692c83c4ec7a643c019d7a78ad837 (patch) | |
tree | 9e3343fdebff83e345bceb917b7d524a29a5aec9 | |
parent | d3cae76cddc4f4a859541d25e0fa08663a1ae03c (diff) |
From NetBSD: protect a curproc dereference against NULL
-rw-r--r-- | sys/vm/vm_fault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 8811995f3af..94df36e20d2 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1,5 +1,5 @@ -/* $OpenBSD: vm_fault.c,v 1.7 1997/07/25 06:03:06 mickey Exp $ */ -/* $NetBSD: vm_fault.c,v 1.18 1996/05/20 17:40:02 mrg Exp $ */ +/* $OpenBSD: vm_fault.c,v 1.8 1997/07/30 20:09:26 niklas Exp $ */ +/* $NetBSD: vm_fault.c,v 1.20 1997/02/18 13:39:33 mrg Exp $ */ /* * Copyright (c) 1991, 1993 @@ -327,7 +327,8 @@ vm_fault(map, vaddr, fault_type, change_wiring) */ UNLOCK_MAP; cnt.v_pageins++; - curproc->p_addr->u_stats.p_ru.ru_majflt++; + if (curproc) + curproc->p_addr->u_stats.p_ru.ru_majflt++; rv = vm_pager_get(object->pager, m, TRUE); /* |