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:
parent
33ffdd8115
commit
35c5de54e8
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user