Don't follow smbnode n_parent pointer when NREFPARENT flag is not set

in smb_fphelp(): the parent vnode may have already been recycled
since we don't hold a reference to it. Fixes a panic when rebooting
with mdconfig -t vnode devices referring to vnodes on a smbfs mount.
This commit is contained in:
Tim J. Robbins 2003-06-14 15:24:54 +00:00
parent 33ffdd8115
commit 35c5de54e8

View File

@ -270,6 +270,8 @@ smb_fphelp(struct mbchain *mbp, struct smb_vc *vcp, struct smbnode *np,
return ENAMETOOLONG;
}
*npp++ = np;
if ((np->n_flag & NREFPARENT) == 0)
break;
np = VTOSMB(np->n_parent);
}
/* if (i == 0)