Avoid a panic in __getcwd(2) when combined with umount -f.

This commit is contained in:
Peter Wemm 2000-02-14 06:09:01 +00:00
parent 1e2901e23b
commit 194a0b6c97
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57199

View File

@ -535,6 +535,8 @@ __getcwd(p, uap)
slash_prefixed = 0;
for (vp = fdp->fd_cdir; vp != fdp->fd_rdir && vp != rootvnode;) {
if (vp->v_flag & VROOT) {
if (vp->v_mount == NULL) /* forced unmount */
return (EBADF);
vp = vp->v_mount->mnt_vnodecovered;
continue;
}