diff options
author | attilio <attilio@FreeBSD.org> | 2008-02-09 20:13:19 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-02-09 20:13:19 +0000 |
commit | 4274e0aa544bfc8eb22331cc686fe2a2a4f460ca (patch) | |
tree | 74cdba6a987c910d5ea437c85c039eb5d6ed8e62 /sys/nfsclient/nfsnode.h | |
parent | 969bd2bc47d529419e722e36a3b54bd5fbe9ffc6 (diff) | |
download | FreeBSD-src-4274e0aa544bfc8eb22331cc686fe2a2a4f460ca.zip FreeBSD-src-4274e0aa544bfc8eb22331cc686fe2a2a4f460ca.tar.gz |
namei() can call underlying nfs_readlink() passing a struct uio pointer
owned by a NULL owner. This will lead consequent VOP_ISLOCKED() present
into nfs_upgrade_vnlock() to panic as it only acquire curthread now.
Fix nfs_upgrade_vnlock() and nfs_downgrade_vnlock() in order to not use
more the struct thread pointer passed as argument (as it is really nomore
required there as vn_lock() and VOP_UNLOCK doesn't get the lock more).
Using curthread, in place, doesn't get ambiguity as LK_EXCLOTHER should
be handled as a "not locked" request by both functions.
Reported by: kris
Tested by: kris
Reviewed by: ups
Diffstat (limited to 'sys/nfsclient/nfsnode.h')
-rw-r--r-- | sys/nfsclient/nfsnode.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h index f6d898a..7f05fa4 100644 --- a/sys/nfsclient/nfsnode.h +++ b/sys/nfsclient/nfsnode.h @@ -205,8 +205,8 @@ nfsuint64 *nfs_getcookie(struct nfsnode *, off_t, int); uint64_t *nfs4_getcookie(struct nfsnode *, off_t, int); void nfs_invaldir(struct vnode *); void nfs4_invaldir(struct vnode *); -int nfs_upgrade_vnlock(struct vnode *vp, struct thread *td); -void nfs_downgrade_vnlock(struct vnode *vp, struct thread *td, int old_lock); +int nfs_upgrade_vnlock(struct vnode *vp); +void nfs_downgrade_vnlock(struct vnode *vp, int old_lock); void nfs_printf(const char *fmt, ...); void nfs_dircookie_lock(struct nfsnode *np); |