1. 21 9月, 2010 1 次提交
  2. 17 9月, 2010 1 次提交
  3. 15 9月, 2010 3 次提交
  4. 14 9月, 2010 3 次提交
  5. 08 9月, 2010 13 次提交
  6. 07 9月, 2010 3 次提交
  7. 22 8月, 2010 1 次提交
  8. 10 8月, 2010 11 次提交
  9. 05 8月, 2010 1 次提交
  10. 02 8月, 2010 3 次提交
    • C
      drm/i915: Unreference object not handle on creation · 86f100b1
      Chris Wilson 提交于
      When creating an object, we create the handle by which it is known to
      the process and which own the reference to the object. That reference to
      the new handle is what we want to transfer to the process, not the lost
      reference to the object; so free the local object reference *not* the
      process's handle reference.
      
      This brings i915_gem_object_create_ioctl() into line with
      drm_gem_open_ioctl()
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      86f100b1
    • C
      drm/i915: Attempt to uncouple object after catastrophic failure in unbind · 8dc1775d
      Chris Wilson 提交于
      If we fail to flush outstanding GPU writes but return the memory to the
      system, we risk corrupting memory should the GPU recovery and complete
      those writes. On the other hand, if we bail early and free the object
      then we have a definite use-after-free and real memory corruption.
      Choose the lesser of two evils, since in order to recover from the hung
      GPU we need to completely reset it, those pending writes should
      never happen.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      8dc1775d
    • C
      drm/i915: Repeat unbinding during free if interrupted (v6) · be72615b
      Chris Wilson 提交于
      If during the freeing of an object the unbind is interrupted by a system
      call, which is quite possible if we have outstanding GPU writes that
      must be flushed, the unbind is silently aborted. This still leaves the
      AGP region and backing pages allocated, and perhaps more importantly,
      the object remains upon the various lists exposing us to memory
      corruption.
      
      I think this is the cause behind the use-after-free, such as
      
        Bug 15664 - Graphics hang and kernel backtrace when starting Azureus
                    with Compiz enabled
        https://bugzilla.kernel.org/show_bug.cgi?id=15664
      
      v2: Daniel Vetter reminded me that kernel space programming is never easy.
      We cannot simply spin to clear the pending signal and so must deferred
      the freeing of the object until later.
      v3: Run from the top level retire requests.
      v4: Tested with P(return -ERESTARTSYS)=.5 from i915_gem_do_wait_request()
      v5: Rebase against Eric's for-linus tree.
      v6: Refactor, split and add a comment about avoiding unbounded recursion.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NEric Anholt <eric@anholt.net>
      be72615b