FreeBSD src
Go to file
Matthew Dillon 389d2b6e21 Fix a refcount race with the vmspace structure. In order to prevent
resource starvation we clean-up as much of the vmspace structure as we
can when the last process using it exits.  The rest of the structure
is cleaned up when it is reaped.  But since exit1() decrements the ref
count it is possible for a double-free to occur if someone else, such as
the process swapout code, references and then dereferences the structure.
Additionally, the final cleanup of the structure should not occur until
the last process referencing it is reaped.

This commit solves the problem by introducing a secondary reference count,
calling 'vm_exitingcnt'.  The normal reference count is decremented on exit
and vm_exitingcnt is incremented.  vm_exitingcnt is decremented when the
process is reaped.  When both vm_exitingcnt and vm_refcnt are 0, the
structure is freed for real.

MFC after:	3 weeks
2002-12-15 18:50:04 +00:00
bin When job control is disabled, never show the job id when reporting the 2002-12-14 01:08:04 +00:00
contrib NetBSD manpages use .Nm "" to typeset the `name' of the manpage, but 2002-12-14 23:45:54 +00:00
crypto If possible, use pthreads instead of a child process for PAM. 2002-12-14 13:52:39 +00:00
etc o Don't consider LOOPBACK devices as configured... 2002-12-13 23:36:31 +00:00
games mdoc(7) police: Added the missing .Os call; it's not strictly 2002-12-11 15:55:29 +00:00
gnu Make minimal changes to point the users to the Texinfo documentation 2002-12-14 23:58:49 +00:00
include Don't install old LOMAC include files; do install new mac_lomac 2002-12-03 15:05:32 +00:00
kerberos5 Update version numbers after import of Heimdal 0.5.1. 2002-11-24 21:00:51 +00:00
kerberosIV update version numbers to (consistenly): 2002-10-23 06:12:21 +00:00
lib o Fix bogus getsockopt(2) call: swap SOCK_STREAM and LOCAL_PEERCRED. 2002-12-15 09:37:54 +00:00
libexec Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
release PC164 is 21172 2002-12-15 14:18:19 +00:00
sbin Add a list of currently supported modes && an EXAMPLES section. 2002-12-14 18:38:34 +00:00
secure Don't build auth-pam.c and auth2-pam.c, auth2-pam-freebsd.c is all we need. 2002-12-14 13:54:57 +00:00
share Change tcp.inflight_min from 1024 to a production default of 6144. Create 2002-12-14 21:00:17 +00:00
sys Fix a refcount race with the vmspace structure. In order to prevent 2002-12-15 18:50:04 +00:00
tools add program used to exercise/test /dev/crypto symmetric crypto functionality 2002-12-14 06:23:58 +00:00
usr.bin When doing tail -F, return if the freopen() of the file fails instead of 2002-12-15 11:26:57 +00:00
usr.sbin Update ROOT_MIN_SIZE for i386 to 118MB (and other ROOT_*_SIZE). 2002-12-15 12:05:00 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
MAINTAINERS Note file, one-true-awk, lukemftpd. 2002-11-28 00:02:25 +00:00
Makefile Build kernels for pc98 just like the other platforms. Also, remove 2002-12-14 22:36:56 +00:00
Makefile.inc1 For installkernel, use the fresh tools (if we've built them with 2002-12-02 14:03:40 +00:00
Makefile.upgrade Removed "env" commands. "sh" is a real shell, so 2002-03-19 05:58:36 +00:00
README Fix broken handbook links. 2002-07-21 16:45:30 +00:00
UPDATING Add an entry for sparc64 users to warn them about potential problems 2002-12-06 13:19:35 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

kerberosIV	KerberosIV (eBones) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html