svn commit: r306960 - stable/11/sys/i386/i386

Tijl Coosemans tijl at FreeBSD.org
Mon Oct 10 11:51:48 UTC 2016


Author: tijl
Date: Mon Oct 10 11:51:47 2016
New Revision: 306960
URL: https://svnweb.freebsd.org/changeset/base/306960

Log:
  MFC: r306318
  
  Allocate a zeroed LDT.
  
  Failing to do this might result in the LDT appearing to run out of free
  descriptors because of random junk in the descriptor's 'sd_type' field.
  
  http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html
  
  PR:		212639
  Submitted by:	wheelcomplex at gmail.com

Modified:
  stable/11/sys/i386/i386/sys_machdep.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/i386/i386/sys_machdep.c
==============================================================================
--- stable/11/sys/i386/i386/sys_machdep.c	Mon Oct 10 11:49:43 2016	(r306959)
+++ stable/11/sys/i386/i386/sys_machdep.c	Mon Oct 10 11:51:47 2016	(r306960)
@@ -438,7 +438,7 @@ user_ldt_alloc(struct mdproc *mdp, int l
 
 	new_ldt->ldt_len = len = NEW_MAX_LD(len);
 	new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena,
-	    len * sizeof(union descriptor), M_WAITOK);
+	    len * sizeof(union descriptor), M_WAITOK | M_ZERO);
 	new_ldt->ldt_refcnt = 1;
 	new_ldt->ldt_active = 0;
 


More information about the svn-src-all mailing list