freebsd-skq/sys
iedowse 63324ae546 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
..
alpha
amd64 Make the kernel actually compile and link under a.out, using 2001-02-25 07:44:39 +00:00
arm/include
boot Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
cam o Support AUTO SENSE correctly. 2001-02-25 12:40:30 +00:00
coda
compat MFS: bring the consistent `compat_3_brand' support into -CURRENT 2001-02-24 22:20:11 +00:00
compile
conf Update NOTES wrt hint for fxp. 2001-02-27 23:02:00 +00:00
contrib
crypto
ddb
dev Slightly reimplement some recently added helper functions as methods, so 2001-02-27 23:13:20 +00:00
fs
geom
gnu Remove the leading underscore from all symbols defined in x86 asm 2001-02-25 06:29:04 +00:00
i4b
i386 Linux does not filesystem-sync file-backed writable mmap pages on 2001-02-28 04:30:27 +00:00
ia64 sched_swi -> swi_sched 2001-02-24 19:09:37 +00:00
isa
isofs/cd9660
kern The kernel did not hold a vnode reference associated with the 2001-02-28 20:54:28 +00:00
libkern
miscfs
modules Not quite working makefile to make the nmdm device as a module. 2001-02-27 16:53:59 +00:00
msdosfs
net Protect against negative numbers as well 2001-02-26 09:52:43 +00:00
netatalk
netatm
netgraph Shuffle netgraph mutexes a bit and hold a reference on a node 2001-02-28 18:49:09 +00:00
netinet Fix jails. 2001-02-28 09:38:48 +00:00
netinet6 More IP option length validation. 2001-02-26 03:41:13 +00:00
netipx
netkey
netnatm
netncp
netns
nfs Fix lockup for loopback NFS mounts. The pipelined I/O limitations could be 2001-02-28 04:13:11 +00:00
nfsclient Fix lockup for loopback NFS mounts. The pipelined I/O limitations could be 2001-02-28 04:13:11 +00:00
nfsserver
ntfs
nwfs
pc98 Added another wd33c93 based SCSI card driver which replaces the bs driver. 2001-02-27 12:34:01 +00:00
pccard
pci A better mousetrap: use device hints, as in: 2001-02-27 22:57:32 +00:00
posix4
powerpc
rpc
svr4
sys Make "md" and "mdctl" macroized parameters. 2001-02-25 13:12:57 +00:00
tools
ufs
vm If we intend to make the page writable without requiring another fault, 2001-02-28 04:26:43 +00:00
Makefile