svn commit: r236935 - head/sys/kern

Pawel Jakub Dawidek pjd at FreeBSD.org
Tue Jun 12 11:45:32 UTC 2012


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 >= 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.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120612/f05ae0cb/attachment.pgp


More information about the svn-src-all mailing list