Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Solve previous fix (for early posix_spawn children e...



details:   https://anonhg.NetBSD.org/src/rev/cef57ad2b66f
branches:  trunk
changeset: 777484:cef57ad2b66f
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Feb 20 12:21:23 2012 +0000

description:
Solve previous fix (for early posix_spawn children exiting on error)
differently.

diffstat:

 sys/uvm/uvm_glue.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 1bbf0af6cf59 -r cef57ad2b66f sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c        Mon Feb 20 12:19:55 2012 +0000
+++ b/sys/uvm/uvm_glue.c        Mon Feb 20 12:21:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_glue.c,v 1.156 2012/02/12 11:18:04 martin Exp $    */
+/*     $NetBSD: uvm_glue.c,v 1.157 2012/02/20 12:21:23 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.156 2012/02/12 11:18:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.157 2012/02/20 12:21:23 martin Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_kstack.h"
@@ -416,14 +416,13 @@
 
        KASSERT(p == l->l_proc);
        ovm = p->p_vmspace;
-       if (__predict_false(ovm == NULL))
-               return;
 
        /*
         * borrow proc0's address space.
         */
        KPREEMPT_DISABLE(l);
-       pmap_deactivate(l);
+       if (__predict_true(ovm != NULL))
+               pmap_deactivate(l);
        p->p_vmspace = proc0.p_vmspace;
        pmap_activate(l);
        KPREEMPT_ENABLE(l);



Home | Main Index | Thread Index | Old Index