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?
This commit is contained in:
martin 2009-12-12 12:23:29 +00:00
parent f714d75546
commit 3ec6df1964

View File

@ -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"
@ -112,6 +112,11 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
panic("cpu_lwp_fork: curlwp");
#endif
/*
* Clear new pcb
*/
memset(pcb2, 0, sizeof(*pcb2));
/*
* Copy the trap frame.
*/