+ /*
+ * Set return values for child before vm_fork,
+ * so they can be copied to child stack.
+ * We return parent pid, and mark as child in retval[1].
+ * NOTE: the kernel stack may be at a different location in the child
+ * process, and thus addresses of automatic variables (including retval)
+ * may be invalid after vm_fork returns in the child process.
+ */
+ retval[0] = p1->p_pid;
+ retval[1] = 1;