Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Clear new pcb in cpu_lwp_fork, now that thi...



details:   https://anonhg.NetBSD.org/src/rev/4fa68e7b790b
branches:  trunk
changeset: 749898:4fa68e7b790b
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Dec 12 12:23:29 2009 +0000

description:
Clear new pcb in cpu_lwp_fork, now that this seems to no longer be
guaranteed to be zeroed memory after the uarea swap changes.
XXX shouldn't we zero the new uarea upfront in MI code before calling
uvm_lwp_fork?

diffstat:

 sys/arch/vax/vax/vm_machdep.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r d2fa99da2c34 -r 4fa68e7b790b sys/arch/vax/vax/vm_machdep.c
--- a/sys/arch/vax/vax/vm_machdep.c     Sat Dec 12 12:19:21 2009 +0000
+++ b/sys/arch/vax/vax/vm_machdep.c     Sat Dec 12 12:23:29 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vm_machdep.c,v 1.110 2009/11/29 04:15:43 rmind Exp $        */
+/*     $NetBSD: vm_machdep.c,v 1.111 2009/12/12 12:23:29 martin Exp $       */
 
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.110 2009/11/29 04:15:43 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.111 2009/12/12 12:23:29 martin Exp $");
 
 #include "opt_execfmt.h"
 #include "opt_compat_ultrix.h"
@@ -113,6 +113,11 @@
 #endif
 
        /*
+        * Clear new pcb
+        */
+       memset(pcb2, 0, sizeof(*pcb2));
+
+       /*
         * Copy the trap frame.
         */
        uv = uvm_lwp_getuarea(l2);



Home | Main Index | Thread Index | Old Index