Subject: Re: poll(2) oddity
To: Christophe Kalt <kalt@taranis.org>
From: Bill Sommerfeld <sommerfeld@netbsd.org>
List: tech-userlevel
Date: 07/07/2002 14:55:52
> ah yes, this explains it, thanks.
> i have holes in the set of file descriptors i pass to poll(),
> so while i have more than 20 elements in the set, the highest
> fd i have is only 11.

While the check in question is clearly buggy, simply removing the
check isn't the right answer -- there needs to be some limit on the
number of poll array elements because the kernel allocates a chunk of
kernel memory to cover them; if the size is unlimited, the user can
ask the kernel to allocate essentially arbitrary amounts of kernel
memory.

But how do we determine what's a reasonable limit?

					- Bill