mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-09 16:01:19 +01:00
Avoid a panic in __getcwd(2) when combined with umount -f.
This commit is contained in:
parent
1e2901e23b
commit
194a0b6c97
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57199
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user