FreeBSD src
Go to file
Ian Dowse a90ef2ae0f The kernel did not hold a vnode reference associated with the
`rootvnode' pointer, but vfs_syscalls.c's checkdirs() assumed that
it did. This bug reliably caused a panic at reboot time if any
filesystem had been mounted directly over /.

The checkdirs() function is called at mount time to find any process
fd_cdir or fd_rdir pointers referencing the covered mountpoint
vnode. It transfers these to point at the root of the new filesystem.
However, this process was not reversed at unmount time, so processes
with a cwd/root at a mount point would unexpectedly lose their
cwd/root following a mount-unmount cycle at that mountpoint.

This change should fix both of the above issues. Start_init() now
holds an extra vnode reference corresponding to `rootvnode', and
dounmount() releases this reference when the root filesystem is
unmounted just before reboot. Dounmount() now undoes the actions
taken by checkdirs() at mount time; any process cdir/rdir pointers
that reference the root vnode of the unmounted filesystem are
transferred to the now-uncovered vnode.

Reviewed by:	bde, phk
2001-02-28 20:54:28 +00:00
bin Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
contrib Repair 8.11.3 merge conflicts 2001-02-28 00:22:47 +00:00
crypto Resolve conflicts 2001-02-18 03:23:30 +00:00
etc ip6fw doesn't support -q if reading from a file so don't use ${fw6cmd} which 2001-02-28 06:51:17 +00:00
games Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
gnu Allow "NOSHARED" to be overridden. 2001-02-28 10:46:50 +00:00
include Impliment the ISO-C99 strto[u]ll() 2001-02-27 13:33:07 +00:00
kerberos5 try hard to make sure this does not get build as a shared library 2001-02-24 02:10:32 +00:00
kerberosIV add strcollect.c to SRCS (new file in 1.0.5) 2000-12-29 23:44:24 +00:00
lib Merge in strtoul.3 rev 1.11 mdoc(7) police changes: 2001-02-28 17:46:56 +00:00
libexec Change the read-only reply to "550 Permission denied.". 2001-02-19 21:51:26 +00:00
release The HEAD now has sendmail 8.11.3 2001-02-28 01:51:13 +00:00
sbin Use _PATH_DEV. 2001-02-28 17:50:29 +00:00
secure Update the list of OpenSSL manpages (now contains many more describing 2001-02-25 21:42:12 +00:00
share Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
sys The kernel did not hold a vnode reference associated with the 2001-02-28 20:54:28 +00:00
tools Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
usr.bin The secure temporary directory is always created, so always remove it. 2001-02-28 19:21:44 +00:00
usr.sbin Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile Cosmetic fix: Document targets at the top in a uniform way. 2001-02-13 07:47:41 +00:00
Makefile.inc1 MACHINE_ARCH is the target arch to crossbuild to, not TARGET_ARCH. 2001-02-22 22:58:24 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README Slightly improve the description of "crypto". "DES" is a subset of 2000-08-31 17:59:01 +00:00
UPDATING It is now safe to go back into the water. 2001-02-28 05:45:16 +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/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 have to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/i386/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.

kerberosIV	Kerberos 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/handbook/synching.html