freebsd-skq/usr.bin/limits
kib 734382a525 Add a resource limit for the total number of kqueues available to the
user.  Kqueue now saves the ucred of the allocating thread, to
correctly decrement the counter on close.

Under some specific and not real-world use scenario for kqueue, it is
possible for the kqueues to consume memory proportional to the square
of the number of the filedescriptors available to the process.  Limit
allows administrator to prevent the abuse.

This is kernel-mode side of the change, with the user-mode enabling
commit following.

Reported and tested by:	pho
Discussed with:	jmg
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-10-21 16:46:12 +00:00
..
limits.1 General mdoc(7) and typo fixes. 2012-05-10 02:07:00 +00:00
limits.c Add a resource limit for the total number of kqueues available to the 2013-10-21 16:46:12 +00:00
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00