Date: Tue, 17 Jun 2014 21:49:03 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267598 - stable/10/sys/amd64/amd64 Message-ID: <201406172149.s5HLn3xX020904@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Tue Jun 17 21:49:03 2014 New Revision: 267598 URL: http://svnweb.freebsd.org/changeset/base/267598 Log: MFC r266901 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. Modified: stable/10/sys/amd64/amd64/sys_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/sys_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/sys_machdep.c Tue Jun 17 21:48:04 2014 (r267597) +++ stable/10/sys/amd64/amd64/sys_machdep.c Tue Jun 17 21:49:03 2014 (r267598) @@ -465,7 +465,7 @@ user_ldt_alloc(struct proc *p, int force new_ldt = malloc(sizeof(struct proc_ldt), M_SUBPROC, M_WAITOK); new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena, max_ldt_segment * sizeof(struct user_segment_descriptor), - M_WAITOK); + M_WAITOK | M_ZERO); if (new_ldt->ldt_base == NULL) { FREE(new_ldt, M_SUBPROC); mtx_lock(&dt_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406172149.s5HLn3xX020904>