Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2014 19:02:34 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265102 - head/sys/dev/drm2/i915
Message-ID:  <201404291902.s3TJ2YDe087571@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404291902.s3TJ2YDe087571>