Date: Fri, 22 Dec 2017 23:22:37 +0700 From: Robert Elz <k...@munnari.oz.au> Message-ID: <1080.1513959...@andromeda.noi.kre.to>
| where vm was declared as | | struct vmspace *vm; | | but is not otherwise initialised Well, not quite, I missed this call in ptrce_doio() error = proc_vmspace_getref(l->l_proc, vm); where proc_vmspace_getref() is ... if ((p != curproc && (p->p_sflag & PS_WEXIT) != 0) || (p->p_vmspace->vm_refcnt < 1)) { /* XXX */ return EFAULT; } uvmspace_addref(p->p_vmspace); *vm = p->p_vmspace; which is much more complex than the old (and now current way) which more or less boils down to *vm = proc0.p_vmspace; (except there is no vm to * ... bt for easier comparison.) The EFAULT that is returned there is probably the one Kamil mentioned. kre