From 6b8ecd0152c48c169be36273563d97ae52bbe5a1 Mon Sep 17 00:00:00 2001 From: tjr Date: Sat, 14 Jun 2003 15:24:54 +0000 Subject: 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. --- sys/fs/smbfs/smbfs_subr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/fs') diff --git a/sys/fs/smbfs/smbfs_subr.c b/sys/fs/smbfs/smbfs_subr.c index f8d2eec..27cd62e 100644 --- a/sys/fs/smbfs/smbfs_subr.c +++ b/sys/fs/smbfs/smbfs_subr.c @@ -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) -- cgit v1.1