summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfs_serv.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-25 16:52:59 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-25 16:52:59 +0000
commit3d2ee0e958b32acb916263a0d6359df03fc62bc5 (patch)
tree8050833b47e3d7a9e5fb9e020472996b9aa9e300 /sys/nfsserver/nfs_serv.c
parent47b3e1d3042baf9e39e847f7c40472f5640a1dd4 (diff)
downloadFreeBSD-src-3d2ee0e958b32acb916263a0d6359df03fc62bc5.zip
FreeBSD-src-3d2ee0e958b32acb916263a0d6359df03fc62bc5.tar.gz
Convert a mtx_lock(&Giant) to a mtx_unlock(&Giant) in nfsrv_link() to
prevent leakage of Giant. With INVARIANTS, this results in an assertion failure following execution of the RPC. Without INVARIANTS, it could result in problems if the NFS server is killed causing nfsd to return to user space holding Giant. Feet provided by: brueffer
Diffstat (limited to 'sys/nfsserver/nfs_serv.c')
-rw-r--r--sys/nfsserver/nfs_serv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index a861c39..a724193 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -2677,7 +2677,7 @@ out2:
VOP_UNLOCK(dirp, 0, td);
}
}
- mtx_lock(&Giant); /* VFS */
+ mtx_unlock(&Giant); /* VFS */
NFSD_LOCK();
ereply:
nfsm_reply(NFSX_POSTOPATTR(v3) + NFSX_WCCDATA(v3));
OpenPOWER on IntegriCloud