diff options
author | tijl <tijl@FreeBSD.org> | 2016-10-10 11:51:47 +0000 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2016-10-10 11:51:47 +0000 |
commit | c872addcd9c9b91575b91d8bf80dcd5ccdce4d0e (patch) | |
tree | c51b6eb9ed2994a1fb76deeaf1c24e1f17e2c508 /sys/i386 | |
parent | da55bad8726390191aad745ef726a492885d7422 (diff) | |
download | FreeBSD-src-c872addcd9c9b91575b91d8bf80dcd5ccdce4d0e.zip FreeBSD-src-c872addcd9c9b91575b91d8bf80dcd5ccdce4d0e.tar.gz |
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@gmail.com
Diffstat (limited to 'sys/i386')
-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 9c8d94b..bbf6317 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; |