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 /etc/login.conf | |
parent | 9110db818a1e36cffed5208b6d005d9c1b84236a (diff) | |
download | src-85a0ddfd0b269f9527883973092c457f04c1af19.tar.gz src-85a0ddfd0b269f9527883973092c457f04c1af19.zip |
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
Notes:
svn path=/head/; revision=256850
Diffstat (limited to 'etc/login.conf')
-rw-r--r-- | etc/login.conf | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/login.conf b/etc/login.conf index 67509f93ea0f..ff98d1ce5beb 100644 --- a/etc/login.conf +++ b/etc/login.conf @@ -42,6 +42,7 @@ default:\ :vmemoryuse=unlimited:\ :swapuse=unlimited:\ :pseudoterminals=unlimited:\ + :kqueues=unlimited:\ :priority=0:\ :ignoretime@:\ :umask=022: |