diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2006-02-03 15:42:16 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2006-02-03 15:42:16 +0000 |
commit | 59428b0bad3cb93e28f1b567e3c7305a80613c49 (patch) | |
tree | 1af4ee2c368eac3f2e6a5957fb329db9a9bbe70a /sys/kern/vfs_extattr.c | |
parent | 937a238777c753ec85052e6476415099772f6000 (diff) | |
download | src-59428b0bad3cb93e28f1b567e3c7305a80613c49.tar.gz src-59428b0bad3cb93e28f1b567e3c7305a80613c49.zip |
In fchdir(), Giant must be separately acquired and dropped if the old
vnode is from a file system that is not MPSAFE, as vrele() expects
Giant to be held when it is called on a non-MPSAFE vnode.
Spotted by: kris
Tested by: glebius
Notes
Notes:
svn path=/head/; revision=155257
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r-- | sys/kern/vfs_extattr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 0a83c7096a3e..035ba9223816 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -711,10 +711,12 @@ fchdir(td, uap) return (error); } VOP_UNLOCK(vp, 0, td); + VFS_UNLOCK_GIANT(vfslocked); FILEDESC_LOCK_FAST(fdp); vpold = fdp->fd_cdir; fdp->fd_cdir = vp; FILEDESC_UNLOCK_FAST(fdp); + vfslocked = VFS_LOCK_GIANT(vpold->v_mount); vrele(vpold); VFS_UNLOCK_GIANT(vfslocked); return (0); |