Module Name: src Committed By: martin Date: Sun Feb 12 11:18:05 UTC 2012
Modified Files: src/sys/uvm: uvm_glue.c Log Message: In uvm_proc_exit bail out early if we have no vmspace yet (as it happens for failing posix_spawn child processes). Fixes PR kern/45991. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.155 src/sys/uvm/uvm_glue.c:1.156 --- src/sys/uvm/uvm_glue.c:1.155 Sat Feb 11 23:16:18 2012 +++ src/sys/uvm/uvm_glue.c Sun Feb 12 11:18:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.155 2012/02/11 23:16:18 martin Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.156 2012/02/12 11:18:04 martin Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.155 2012/02/11 23:16:18 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.156 2012/02/12 11:18:04 martin Exp $"); #include "opt_kgdb.h" #include "opt_kstack.h" @@ -416,6 +416,8 @@ uvm_proc_exit(struct proc *p) KASSERT(p == l->l_proc); ovm = p->p_vmspace; + if (__predict_false(ovm == NULL)) + return; /* * borrow proc0's address space.