diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2016-09-25 18:29:02 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2016-09-25 18:29:02 +0000 |
commit | 81d7ca7761ba1224a98686a8c5ca3f454636b9bc (patch) | |
tree | 8922ae615f8ddfced7689f464732868e65795eb9 /sys/i386/i386/sys_machdep.c | |
parent | 6d93a08d0aeb0bed8284fdeafc70dc23f4e36c21 (diff) | |
download | src-81d7ca7761ba1224a98686a8c5ca3f454636b9bc.tar.gz src-81d7ca7761ba1224a98686a8c5ca3f454636b9bc.zip |
MFamd64: 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.
http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html
PR: 212639
Submitted by: wheelcomplex@gmail.com
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=306318
Diffstat (limited to 'sys/i386/i386/sys_machdep.c')
-rw-r--r-- | sys/i386/i386/sys_machdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 9c8d94b44b81..bbf631781d1d 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -438,7 +438,7 @@ user_ldt_alloc(struct mdproc *mdp, int len) 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; |