diff options
author | tjr <tjr@FreeBSD.org> | 2003-06-14 15:24:54 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2003-06-14 15:24:54 +0000 |
commit | 6b8ecd0152c48c169be36273563d97ae52bbe5a1 (patch) | |
tree | b2b73afd58865ddb36181e996a6d0cb17400a8bd /sys/fs | |
parent | 23174ba968d72735a3fdf0b790b14ccabdc40946 (diff) | |
download | FreeBSD-src-6b8ecd0152c48c169be36273563d97ae52bbe5a1.zip FreeBSD-src-6b8ecd0152c48c169be36273563d97ae52bbe5a1.tar.gz |
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.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/smbfs/smbfs_subr.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) |