From owner-cvs-src@FreeBSD.ORG Sat Feb 9 20:13:20 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B73D16A421; Sat, 9 Feb 2008 20:13:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFAA13C4DD; Sat, 9 Feb 2008 20:13:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m19KDKCD083035; Sat, 9 Feb 2008 20:13:20 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from attilio@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m19KDKMi083034; Sat, 9 Feb 2008 20:13:20 GMT (envelope-from attilio) Message-Id: <200802092013.m19KDKMi083034@repoman.freebsd.org> From: Attilio Rao Date: Sat, 9 Feb 2008 20:13:19 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/nfsclient nfs_bio.c nfs_subs.c nfsnode.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 20:13:20 -0000 attilio 2008-02-09 20:13:19 UTC FreeBSD src repository Modified files: sys/nfsclient nfs_bio.c nfs_subs.c nfsnode.h Log: 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 Revision Changes Path 1.166 +4 -4 src/sys/nfsclient/nfs_bio.c 1.151 +3 -3 src/sys/nfsclient/nfs_subs.c 1.61 +2 -2 src/sys/nfsclient/nfsnode.h