From owner-svn-src-head@FreeBSD.ORG Tue Jun 4 17:23:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 858215F7; Tue, 4 Jun 2013 17:23:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 776971037; Tue, 4 Jun 2013 17:23:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r54HN9Vl086179; Tue, 4 Jun 2013 17:23:09 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r54HN9lg086178; Tue, 4 Jun 2013 17:23:09 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201306041723.r54HN9lg086178@svn.freebsd.org> From: Alan Cox Date: Tue, 4 Jun 2013 17:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251391 - head/sys/security/mac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2013 17:23:09 -0000 Author: alc Date: Tue Jun 4 17:23:09 2013 New Revision: 251391 URL: http://svnweb.freebsd.org/changeset/base/251391 Log: Relax the vm object locking in mac_proc_vm_revoke_recurse(). A read lock suffices in one place. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/security/mac/mac_process.c Modified: head/sys/security/mac/mac_process.c ============================================================================== --- head/sys/security/mac/mac_process.c Tue Jun 4 17:08:26 2013 (r251390) +++ head/sys/security/mac/mac_process.c Tue Jun 4 17:23:09 2013 (r251391) @@ -284,14 +284,14 @@ mac_proc_vm_revoke_recurse(struct thread object = vme->object.vm_object; if (object == NULL) continue; - VM_OBJECT_WLOCK(object); + VM_OBJECT_RLOCK(object); while ((backing_object = object->backing_object) != NULL) { - VM_OBJECT_WLOCK(backing_object); + VM_OBJECT_RLOCK(backing_object); offset += object->backing_object_offset; - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RUNLOCK(object); object = backing_object; } - VM_OBJECT_WUNLOCK(object); + VM_OBJECT_RUNLOCK(object); /* * At the moment, vm_maps and objects aren't considered by * the MAC system, so only things with backing by a normal