summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/src/optional.cpp
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-10-08 11:07:09 +0000
committerkib <kib@FreeBSD.org>2015-10-08 11:07:09 +0000
commit753bf3d282c287dd757e2b3860c3d980adbb6deb (patch)
tree508a1c71b5ce2317cb6e72e10a1cfa204f6faea0 /contrib/libc++/src/optional.cpp
parentfe32b4226d2db0f67b7ec62b370b6a4811ee7a99 (diff)
downloadFreeBSD-src-753bf3d282c287dd757e2b3860c3d980adbb6deb.zip
FreeBSD-src-753bf3d282c287dd757e2b3860c3d980adbb6deb.tar.gz
Enforce the maxproc limitation before allocating struct proc, initial
struct thread and kernel stack for the thread. Otherwise, a load similar to a fork bomb would exhaust KVA and possibly kmem, mostly due to the struct proc being type-stable. The nprocs counter is changed from being protected by allproc_lock sx to be an atomic variable. Note that ddb/db_ps.c:db_ps() use of nprocs was unsafe before, and is still unsafe, but it seems that the only possible undesired consequence is the harmless warning printed when allproc linked list length does not match nprocs. Diagnosed by: Svatopluk Kraus <onwahe@gmail.com> Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'contrib/libc++/src/optional.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud