mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Reference in a new issue