diff options
author | hsu <hsu@FreeBSD.org> | 2003-06-05 06:05:57 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2003-06-05 06:05:57 +0000 |
commit | 74c170f9c2d9b7611d6e42962492e8d8d718c5f0 (patch) | |
tree | 1b7bd31716616cd2c2059a28d3ea5a9d67bbc816 /sys | |
parent | 563547c6bcea9af43fe8c4bb2ee678ffbbf6efb7 (diff) | |
download | FreeBSD-src-74c170f9c2d9b7611d6e42962492e8d8d718c5f0.zip FreeBSD-src-74c170f9c2d9b7611d6e42962492e8d8d718c5f0.tar.gz |
Protect read-modify-write increment of f_count field with file lock.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsserver/nfs_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c index 83a3b32..26f729d 100644 --- a/sys/nfsserver/nfs_syscalls.c +++ b/sys/nfsserver/nfs_syscalls.c @@ -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; |