summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-05-30 20:58:32 +0000
committerneel <neel@FreeBSD.org>2014-05-30 20:58:32 +0000
commit0a0e9fcd5a128aec054c213ec1a01a42c8e91578 (patch)
tree2d519d485a9499b691c49e3c400bc22e8035e0bf
parent5a44f9b6ee748dc64feefc057761b9af806a3d2d (diff)
downloadFreeBSD-src-0a0e9fcd5a128aec054c213ec1a01a42c8e91578.zip
FreeBSD-src-0a0e9fcd5a128aec054c213ec1a01a42c8e91578.tar.gz
Remove bogus check for kmem_malloc() failure even though M_WAITOK is set.
Requested by: jkim
-rw-r--r--sys/amd64/amd64/sys_machdep.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index a7420b7..41709c2 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -357,8 +357,6 @@ amd64_set_ioperm(td, uap)
if (pcb->pcb_tssp == NULL) {
tssp = (struct amd64tss *)kmem_malloc(kernel_arena,
ctob(IOPAGES+1), M_WAITOK);
- if (tssp == NULL)
- return (ENOMEM);
iomap = (char *)&tssp[1];
memset(iomap, 0xff, IOPERM_BITMAP_SIZE);
critical_enter();
@@ -463,11 +461,6 @@ user_ldt_alloc(struct proc *p, int force)
new_ldt->ldt_base = (caddr_t)kmem_malloc(kernel_arena,
max_ldt_segment * sizeof(struct user_segment_descriptor),
M_WAITOK | M_ZERO);
- if (new_ldt->ldt_base == NULL) {
- FREE(new_ldt, M_SUBPROC);
- mtx_lock(&dt_lock);
- return (NULL);
- }
new_ldt->ldt_refcnt = 1;
sldt.ssd_base = (uint64_t)new_ldt->ldt_base;
sldt.ssd_limit = max_ldt_segment *
OpenPOWER on IntegriCloud