diff options
-rw-r--r-- | sys/amd64/amd64/sys_machdep.c | 9 | ||||
-rw-r--r-- | sys/i386/i386/sys_machdep.c | 16 |
2 files changed, 14 insertions, 11 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 2f136ab..ac691d0 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -356,8 +356,8 @@ amd64_set_ioperm(td, uap) */ pcb = td->td_pcb; if (pcb->pcb_tssp == NULL) { - tssp = (struct amd64tss *)kmem_alloc(kernel_map, - ctob(IOPAGES+1)); + tssp = (struct amd64tss *)kmem_malloc(kernel_map, + ctob(IOPAGES+1), M_WAITOK); if (tssp == NULL) return (ENOMEM); iomap = (char *)&tssp[1]; @@ -463,8 +463,9 @@ user_ldt_alloc(struct proc *p, int force) return (mdp->md_ldt); mtx_unlock(&dt_lock); new_ldt = malloc(sizeof(struct proc_ldt), M_SUBPROC, M_WAITOK); - new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map, - max_ldt_segment * sizeof(struct user_segment_descriptor)); + new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_map, + max_ldt_segment * sizeof(struct user_segment_descriptor), + M_WAITOK); if (new_ldt->ldt_base == NULL) { FREE(new_ldt, M_SUBPROC); mtx_lock(&dt_lock); diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c index 374690f..00d74d3 100644 --- a/sys/i386/i386/sys_machdep.c +++ b/sys/i386/i386/sys_machdep.c @@ -164,8 +164,9 @@ sysarch(td, uap) break; case I386_SET_LDT: if (kargs.largs.descs != NULL) { - lp = (union descriptor *)kmem_alloc(kernel_map, - kargs.largs.num * sizeof(union descriptor)); + lp = (union descriptor *)kmem_malloc(kernel_map, + kargs.largs.num * sizeof(union descriptor), + M_WAITOK); if (lp == NULL) { error = ENOMEM; break; @@ -298,7 +299,8 @@ i386_extend_pcb(struct thread *td) 0 /* granularity */ }; - ext = (struct pcb_ext *)kmem_alloc(kernel_map, ctob(IOPAGES+1)); + ext = (struct pcb_ext *)kmem_malloc(kernel_map, ctob(IOPAGES+1), + M_WAITOK); if (ext == 0) return (ENOMEM); bzero(ext, sizeof(struct pcb_ext)); @@ -471,8 +473,8 @@ user_ldt_alloc(struct mdproc *mdp, int len) M_SUBPROC, M_WAITOK); new_ldt->ldt_len = len = NEW_MAX_LD(len); - new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map, - round_page(len * sizeof(union descriptor))); + new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_map, + round_page(len * sizeof(union descriptor)), M_WAITOK); if (new_ldt->ldt_base == NULL) { free(new_ldt, M_SUBPROC); mtx_lock_spin(&dt_lock); @@ -511,8 +513,8 @@ user_ldt_alloc(struct mdproc *mdp, int len) M_SUBPROC, M_WAITOK); new_ldt->ldt_len = len = NEW_MAX_LD(len); - new_ldt->ldt_base = (caddr_t)kmem_alloc(kernel_map, - len * sizeof(union descriptor)); + new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_map, + len * sizeof(union descriptor), M_WAITOK); if (new_ldt->ldt_base == NULL) { free(new_ldt, M_SUBPROC); mtx_lock_spin(&dt_lock); |