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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to