From owner-svn-src-stable-7@FreeBSD.ORG Tue Feb 17 22:49:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 017DA106564A; Tue, 17 Feb 2009 22:49:59 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E31498FC08; Tue, 17 Feb 2009 22:49:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1HMnwXe030038; Tue, 17 Feb 2009 22:49:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1HMnwAG030037; Tue, 17 Feb 2009 22:49:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200902172249.n1HMnwAG030037@svn.freebsd.org> From: John Baldwin Date: Tue, 17 Feb 2009 22:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188739 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 22:50:00 -0000 Author: jhb Date: Tue Feb 17 22:49:58 2009 New Revision: 188739 URL: http://svn.freebsd.org/changeset/base/188739 Log: The previous MFC only fixed the old kern.proc.vmmap sysctl. Fix the new one as well to not hold the vnode lock for vn_fullpath() and only use a shared vnode lock for VOP_GETATTR(). Modified: stable/7/sys/kern/kern_proc.c Modified: stable/7/sys/kern/kern_proc.c ============================================================================== --- stable/7/sys/kern/kern_proc.c Tue Feb 17 22:46:30 2009 (r188738) +++ stable/7/sys/kern/kern_proc.c Tue Feb 17 22:49:58 2009 (r188739) @@ -1646,12 +1646,11 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR kve->kve_shadow_count = obj->shadow_count; VM_OBJECT_UNLOCK(obj); if (vp != NULL) { - vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, - curthread); vn_fullpath(curthread, vp, &fullpath, &freepath); cred = curthread->td_ucred; + vfslocked = VFS_LOCK_GIANT(vp->v_mount); + vn_lock(vp, LK_SHARED | LK_RETRY, curthread); if (VOP_GETATTR(vp, &va, cred, curthread) == 0) { kve->kve_fileid = va.va_fileid; kve->kve_fsid = va.va_fsid;