From owner-svn-src-head@FreeBSD.ORG Tue Apr 29 19:02:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D155AA1; Tue, 29 Apr 2014 19:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A14CDAE; Tue, 29 Apr 2014 19:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3TJ2YEQ087572; Tue, 29 Apr 2014 19:02:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3TJ2YDe087571; Tue, 29 Apr 2014 19:02:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201404291902.s3TJ2YDe087571@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 29 Apr 2014 19:02:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265102 - head/sys/dev/drm2/i915 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.17 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, 29 Apr 2014 19:02:34 -0000 Author: kib Date: Tue Apr 29 19:02:34 2014 New Revision: 265102 URL: http://svnweb.freebsd.org/changeset/base/265102 Log: Fix two cases of recursive acquisitions of the vm object lock, only possible in rare failure situations. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/drm2/i915/i915_gem.c Modified: head/sys/dev/drm2/i915/i915_gem.c ============================================================================== --- head/sys/dev/drm2/i915/i915_gem.c Tue Apr 29 18:42:56 2014 (r265101) +++ head/sys/dev/drm2/i915/i915_gem.c Tue Apr 29 19:02:34 2014 (r265102) @@ -1431,6 +1431,7 @@ retry: m = vm_phys_fictitious_to_vm_page(dev->agp->base + obj->gtt_offset + offset); if (m == NULL) { + VM_OBJECT_WUNLOCK(vm_obj); cause = 60; ret = -EFAULT; goto unlock; @@ -1450,7 +1451,6 @@ retry: DRM_UNLOCK(dev); VM_OBJECT_WUNLOCK(vm_obj); VM_WAIT; - VM_OBJECT_WLOCK(vm_obj); goto retry; } m->valid = VM_PAGE_BITS_ALL;