Module Name: src Committed By: pooka Date: Thu Feb 10 13:40:35 UTC 2011
Modified Files: src/sys/rump/librump/rumpkern: lwproc.c Log Message: Explicitly zerofill some fields which are not within the boundaries of p_start/endzero for whatever reasons. Obviously, this fixes remote physio when running with MALLOC_OPTIONS J. Otherwise PS_WEXIT is set in struct proc, proc_vmspace_getref() fails, and copyout_proc() with it. Reported by njoly To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/rump/librump/rumpkern/lwproc.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/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.14 src/sys/rump/librump/rumpkern/lwproc.c:1.15 --- src/sys/rump/librump/rumpkern/lwproc.c:1.14 Thu Feb 10 13:31:30 2011 +++ src/sys/rump/librump/rumpkern/lwproc.c Thu Feb 10 13:40:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.14 2011/02/10 13:31:30 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.15 2011/02/10 13:40:35 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.14 2011/02/10 13:31:30 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.15 2011/02/10 13:40:35 pooka Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -112,6 +112,16 @@ offsetof(struct proc, p_endcopy) - offsetof(struct proc, p_startcopy)); + /* some other garbage we need to zero */ + p->p_sigacts = NULL; + p->p_aio = NULL; + p->p_dtrace = NULL; + p->p_mqueue_cnt = p->p_exitsig = 0; + p->p_flag = p->p_sflag = p->p_slflag = p->p_lflag = p->p_stflag = 0; + p->p_trace_enabled = 0; + p->p_xstat = p->p_acflag = 0; + p->p_stackbase = 0; + p->p_stats = pstatscopy(parent->p_stats); p->p_vmspace = vmspace_kernel();