amd64: plug missed dt_lock in cpu_fork

This commit is contained in:
mjg 2017-10-20 18:58:11 +00:00
parent 3b0b7e2626
commit 397cc565b8

View File

@ -244,6 +244,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
/* Copy the LDT, if necessary. */
mdp1 = &td1->td_proc->p_md;
mdp2 = &p2->p_md;
if (mdp1->md_ldt == NULL) {
mdp2->md_ldt = NULL;
return;
}
mtx_lock(&dt_lock);
if (mdp1->md_ldt != NULL) {
if (flags & RFMEM) {