From owner-cvs-src-old@FreeBSD.ORG Tue Nov 4 19:04:40 2008 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 961E91065675 for ; Tue, 4 Nov 2008 19:04:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 824858FC0C for ; Tue, 4 Nov 2008 19:04:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mA4J4eei043089 for ; Tue, 4 Nov 2008 19:04:40 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mA4J4e29043088 for cvs-src-old@freebsd.org; Tue, 4 Nov 2008 19:04:40 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200811041904.mA4J4e29043088@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Tue, 4 Nov 2008 19:04:01 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/hwpmc hwpmc_mod.c src/sys/fs/procfs procfs.c procfs_map.c src/sys/kern kern_descrip.c kern_proc.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 19:04:40 -0000 jhb 2008-11-04 19:04:01 UTC FreeBSD src repository Modified files: sys/dev/hwpmc hwpmc_mod.c sys/fs/procfs procfs.c procfs_map.c sys/kern kern_descrip.c kern_proc.c Log: SVN rev 184652 on 2008-11-04 19:04:01Z by jhb Remove unnecessary locking around vn_fullpath(). The vnode lock for the vnode in question does not need to be held. All the data structures used during the name lookup are protected by the global name cache lock. Instead, the caller merely needs to ensure a reference is held on the vnode (such as vhold()) to keep it from being freed. In the case of procfs' /file entry, grab the process lock while we gain a new reference (via vhold()) on p_textvp to fully close races with execve(2). For the kern.proc.vmmap sysctl handler, use a shared vnode lock around the call to VOP_GETATTR() rather than an exclusive lock. MFC after: 1 month Revision Changes Path 1.37 +0 -2 src/sys/dev/hwpmc/hwpmc_mod.c 1.19 +4 -8 src/sys/fs/procfs/procfs.c 1.43 +2 -3 src/sys/fs/procfs/procfs_map.c 1.342 +4 -6 src/sys/kern/kern_descrip.c 1.271 +2 -2 src/sys/kern/kern_proc.c