diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -198,7 +198,6 @@ bcopy(&p1->p_md, mdp2, sizeof(*mdp2)); /* - * Create a new fresh stack for the new process. * Copy the trap frame for the return to user mode as if from a * syscall. This copies most of the user mode register values. */ @@ -606,7 +605,10 @@ /* - * Create a new fresh stack for the new thread. + * Copy user general-purpose registers. + * + * Some of these registers are rewritten by cpu_set_upcall() + * and linux_set_upcall_kse(). */ bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -205,7 +205,6 @@ bcopy(&p1->p_md, mdp2, sizeof(*mdp2)); /* - * Create a new fresh stack for the new process. * Copy the trap frame for the return to user mode as if from a * syscall. This copies most of the user mode register values. * The -VM86_STACK_SPACE (-16) is so we can expand the trapframe @@ -473,7 +472,10 @@ } /* - * Create a new fresh stack for the new thread. + * Copy user general-purpose registers. + * + * Some of these registers are rewritten by cpu_set_upcall() + * and linux_set_upcall_kse(). */ bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe));