From owner-svn-src-stable-10@FreeBSD.ORG Tue Jan 7 19:28:11 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50F6CFD3; Tue, 7 Jan 2014 19:28:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C37815E1; Tue, 7 Jan 2014 19:28:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s07JSBvP056103; Tue, 7 Jan 2014 19:28:11 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s07JSB2s056102; Tue, 7 Jan 2014 19:28:11 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201401071928.s07JSB2s056102@svn.freebsd.org> From: Mateusz Guzik Date: Tue, 7 Jan 2014 19:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260400 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2014 19:28:11 -0000 Author: mjg Date: Tue Jan 7 19:28:10 2014 New Revision: 260400 URL: http://svnweb.freebsd.org/changeset/base/260400 Log: MFC r260232: 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. Modified: stable/10/sys/kern/kern_descrip.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Tue Jan 7 19:02:08 2014 (r260399) +++ stable/10/sys/kern/kern_descrip.c Tue Jan 7 19:28:10 2014 (r260400) @@ -1482,18 +1482,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); }