From owner-svn-src-head@FreeBSD.ORG Tue Jun 12 11:45:32 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0E42106566C; Tue, 12 Jun 2012 11:45:32 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 81D518FC12; Tue, 12 Jun 2012 11:45:32 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 211AB141; Tue, 12 Jun 2012 13:45:30 +0200 (CEST) Date: Tue, 12 Jun 2012 13:43:35 +0200 From: Pawel Jakub Dawidek To: Mateusz Guzik Message-ID: <20120612114335.GA1372@garage.freebsd.pl> References: <201206112205.q5BM5QIv013266@svn.freebsd.org> <4FD6FD39.5090800@gmail.com> <20120612104749.GB20749@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline In-Reply-To: <20120612104749.GB20749@dft-labs.eu> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, davidxu@FreeBSD.org Subject: Re: svn commit: r236935 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2012 11:45:32 -0000 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 12, 2012 at 12:47:49PM +0200, Mateusz Guzik wrote: > The problem is that fdalloc grows to at most fdp->fd_nfiles * 2, which > still may not be enough to have place for new fd with high number. I was under impression that fd_first_free() can return at most fdp->fd_nfiles, but indeed I missed this: if (low >=3D size) return (low); So fd_first_free() can return number biffer than size... > This fixed the problem for me, although I'm not sure whether it's ok to > grow the table like this: > http://people.freebsd.org/~mjg/patches/fdalloc.patch The patch looks good to me, could you please commit it, preferably after David's trying it and also update fd_first_free() comment, so it is clear that returned value can exceed 'size -1'? David, can you try Mateusz's patch? Thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAk/XK2cACgkQForvXbEpPzQJnACfYAr5hVTe0xnTCHdgrHSZXasD jQwAoMThIBwK4zYxTeO1IF3zmSTZ6ABN =MZJW -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--