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 Reviewed by: kib MFC after: 2 weeks
This commit is contained in:
parent
f2d7865517
commit
8e351f8a3c
@ -462,7 +462,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);
|
||||
|
Loading…
Reference in New Issue
Block a user