svn commit: r324808 - head/sys/amd64/amd64
Mateusz Guzik
mjg at FreeBSD.org
Fri Oct 20 18:58:12 UTC 2017
Author: mjg
Date: Fri Oct 20 18:58:11 2017
New Revision: 324808
URL: https://svnweb.freebsd.org/changeset/base/324808
Log:
amd64: plug missed dt_lock in cpu_fork
Modified:
head/sys/amd64/amd64/vm_machdep.c
Modified: head/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- head/sys/amd64/amd64/vm_machdep.c Fri Oct 20 18:40:29 2017 (r324807)
+++ head/sys/amd64/amd64/vm_machdep.c Fri Oct 20 18:58:11 2017 (r324808)
@@ -244,6 +244,10 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t
/* 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) {
More information about the svn-src-head
mailing list