mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
In nfs_nget() if two threads race on the same filehandle, the loser should
cause the nfsnode to get freed. This fixes a potential vnode (and nfsnode) leak in that path. Submitted by: Mohan Srinivasan Reviewed by: phk
This commit is contained in:
parent
5495564735
commit
4fb48d10b0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148447
@ -154,7 +154,8 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp)
|
||||
return (error);
|
||||
if (nvp != NULL) {
|
||||
*npp = VTONFS(nvp);
|
||||
/* XXX I wonder of nfs_reclaim will survive the unused vnode */
|
||||
/* vrele() the duplicate allocated here, to get it recycled */
|
||||
vrele(vp);
|
||||
return (0);
|
||||
}
|
||||
if (fhsize > NFS_SMALLFH) {
|
||||
|
Loading…
Reference in New Issue
Block a user