summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r--sys/kern/vfs_cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 860db8d..33462b1 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -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;
}
OpenPOWER on IntegriCloud