Author: mjg
Date: Fri Jan  3 16:34:16 2014
New Revision: 260232
URL: http://svnweb.freebsd.org/changeset/base/260232

Log:
  Don't check for fd limits in fdgrowtable_exp.
  
  Callers do that already and additional check races with process
  decreasing limits and can result in not growing the table at all, which
  is currently not handled.
  
  MFC after:    3 days

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c        Fri Jan  3 15:55:20 2014        
(r260231)
+++ head/sys/kern/kern_descrip.c        Fri Jan  3 16:34:16 2014        
(r260232)
@@ -1481,18 +1481,13 @@ filecaps_validate(const struct filecaps 
 static void
 fdgrowtable_exp(struct filedesc *fdp, int nfd)
 {
-       int nfd1, maxfd;
+       int nfd1;
 
        FILEDESC_XLOCK_ASSERT(fdp);
 
        nfd1 = fdp->fd_nfiles * 2;
        if (nfd1 < nfd)
                nfd1 = nfd;
-       maxfd = getmaxfd(curproc);
-       if (maxfd < nfd1)
-               nfd1 = maxfd;
-       KASSERT(nfd <= nfd1,
-           ("too low nfd1 %d %d %d %d", nfd, fdp->fd_nfiles, maxfd, nfd1));
        fdgrowtable(fdp, nfd1);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to