diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-01-27 15:22:20 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-01-27 15:22:20 +0000 |
commit | 3c42ac5cd551fe829f4d35317c16a44d287b0cb8 (patch) | |
tree | d60068d127fdd1a020342ef14d2b90110e566716 /sys/nfsclient/nfs.h | |
parent | c75f72dd7c93d46f29e0e0a7b6fce9f5104ae43c (diff) | |
download | FreeBSD-src-3c42ac5cd551fe829f4d35317c16a44d287b0cb8.zip FreeBSD-src-3c42ac5cd551fe829f4d35317c16a44d287b0cb8.tar.gz |
Fix a race that can occur when nfs nfsiod threads are being created.
Without this patch it was possible for a different thread that calls
nfs_asyncio() to snitch a newly created nfsiod thread that was
intended for another caller of nfs_asyncio(), because the nfs_iod_mtx
mutex was unlocked while the new nfsiod thread was created. This patch
labels the newly created nfsiod, so that it is not taken by another
caller of nfs_asyncio(). This is believed to fix the problem reported
on the freebsd-stable email list under the subject:
FreeBSD NFS client/Linux NFS server issue.
Tested by: to DOT my DOT trociny AT gmail DOT com
Reviewed by: jhb
MFC after: 2 weeks
Diffstat (limited to 'sys/nfsclient/nfs.h')
-rw-r--r-- | sys/nfsclient/nfs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 18eae3b..6f6e0d33 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -252,7 +252,7 @@ int nfs_writerpc(struct vnode *, struct uio *, struct ucred *, int *, int nfs_commit(struct vnode *vp, u_quad_t offset, int cnt, struct ucred *cred, struct thread *td); int nfs_readdirrpc(struct vnode *, struct uio *, struct ucred *); -int nfs_nfsiodnew(void); +int nfs_nfsiodnew(int); int nfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct thread *); int nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *); void nfs_doio_directwrite (struct buf *); |