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
This commit is contained in:
parent
97c6143c95
commit
e2d2098653
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134296
@ -2677,7 +2677,7 @@ nfsrv_link(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
|
||||
VOP_UNLOCK(dirp, 0, td);
|
||||
}
|
||||
}
|
||||
mtx_lock(&Giant); /* VFS */
|
||||
mtx_unlock(&Giant); /* VFS */
|
||||
NFSD_LOCK();
|
||||
ereply:
|
||||
nfsm_reply(NFSX_POSTOPATTR(v3) + NFSX_WCCDATA(v3));
|
||||
|
Loading…
Reference in New Issue
Block a user