summaryrefslogtreecommitdiffstats
path: root/etc/defaults/rc.conf
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-02-28 20:54:28 +0000
committeriedowse <iedowse@FreeBSD.org>2001-02-28 20:54:28 +0000
commit63324ae54624fc9c3b71a42fc13103a72c73dd8f (patch)
tree60075844c6911fc6d502963c2a78b7e171aa4567 /etc/defaults/rc.conf
parent3af5c788c31cdf5c004daba60a9c823d9869821b (diff)
downloadFreeBSD-src-63324ae54624fc9c3b71a42fc13103a72c73dd8f.zip
FreeBSD-src-63324ae54624fc9c3b71a42fc13103a72c73dd8f.tar.gz
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
Diffstat (limited to 'etc/defaults/rc.conf')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud