diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2013-10-21 16:46:12 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2013-10-21 16:46:12 +0000 |
| commit | 85a0ddfd0b269f9527883973092c457f04c1af19 (patch) | |
| tree | 04786befd82e74b0298aa6139cca4192ba215854 /lib/libc/sys/getrlimit.2 | |
| parent | 9110db818a1e36cffed5208b6d005d9c1b84236a (diff) | |
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
Notes
svn path=/head/; revision=256850
Diffstat (limited to 'lib/libc/sys/getrlimit.2')
| -rw-r--r-- | lib/libc/sys/getrlimit.2 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index 35198bce3062..1f84bfb0f0e8 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -108,6 +108,8 @@ Please see for a complete description of this sysctl. .It Dv RLIMIT_NPTS The maximum number of pseudo-terminals created by this user id. +.It Dv RLIMIT_KQUEUES +The maximum number of kqueues created by this user id. .El .Pp A resource limit is specified as a soft limit and a hard limit. |
