Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 2017 18:58:11 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r324808 - head/sys/amd64/amd64
Message-ID:  <201710201858.v9KIwBKB002444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710201858.v9KIwBKB002444>