diff options
author | davide <davide@FreeBSD.org> | 2012-11-22 08:58:29 +0000 |
---|---|---|
committer | davide <davide@FreeBSD.org> | 2012-11-22 08:58:29 +0000 |
commit | 017de7d0303ff918f52d32ec10a552ddb5c8906f (patch) | |
tree | e433574688bbdd45f9dafc017b3a702122efbb9f /sys/fs/smbfs/smbfs_vfsops.c | |
parent | 855b0bb00b49b02f2815692ca7f316366059c89e (diff) | |
download | FreeBSD-src-017de7d0303ff918f52d32ec10a552ddb5c8906f.zip FreeBSD-src-017de7d0303ff918f52d32ec10a552ddb5c8906f.tar.gz |
Until now, smbfs_fullpath() computed the full path starting from the
vnode and following back the chain of n_parent pointers up to the root,
without acquiring the locks of the n_parent vnodes analyzed during the
computation. This is immediately wrong because if the vnode lock is not
held there's no guarantee on the validity of the vnode pointer or the data.
In order to fix, store the whole path in the smbnode structure so that
smbfs_fullpath() can use this information.
Discussed with: kib
Reported and tested by: pho
Sponsored by: iXsystems inc.
Diffstat (limited to 'sys/fs/smbfs/smbfs_vfsops.c')
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index 11dba2a..781857d 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -320,7 +320,7 @@ smbfs_root(struct mount *mp, int flags, struct vnode **vpp) error = smbfs_smb_lookup(NULL, NULL, 0, &fattr, scred); if (error) goto out; - error = smbfs_nget(mp, NULL, "TheRooT", 7, &fattr, &vp); + error = smbfs_nget(mp, NULL, NULL, 0, &fattr, &vp); if (error) goto out; ASSERT_VOP_LOCKED(vp, "smbfs_root"); |