Protect read-modify-write increment of f_count field with file lock.

This commit is contained in:
Jeffrey Hsu 2003-06-05 06:05:57 +00:00
parent 1e9e2eb598
commit 30ef7aacc2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115870

View File

@ -268,7 +268,7 @@ nfssvc_addsock(struct file *fp, struct sockaddr *mynam, struct thread *td)
slp->ns_so = so;
slp->ns_nam = mynam;
fp->f_count++;
fhold(fp);
slp->ns_fp = fp;
s = splnet();
so->so_upcallarg = (caddr_t)slp;