Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 May 2014 20:58:32 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266905 - head/sys/amd64/amd64
Message-ID:  <201405302058.s4UKwWJA074711@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Fri May 30 20:58:32 2014
New Revision: 266905
URL: http://svnweb.freebsd.org/changeset/base/266905

Log:
  Remove bogus check for kmem_malloc() failure even though M_WAITOK is set.
  
  Requested by:	jkim

Modified:
  head/sys/amd64/amd64/sys_machdep.c

Modified: head/sys/amd64/amd64/sys_machdep.c
==============================================================================
--- head/sys/amd64/amd64/sys_machdep.c	Fri May 30 20:56:28 2014	(r266904)
+++ head/sys/amd64/amd64/sys_machdep.c	Fri May 30 20:58:32 2014	(r266905)
@@ -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 *



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405302058.s4UKwWJA074711>