]> bbs.cooldavid.org Git - net-next-2.6.git/commit
drm/i915: Attempt to uncouple object after catastrophic failure in unbind
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 23 Jul 2010 22:18:51 +0000 (23:18 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 2 Aug 2010 02:56:29 +0000 (19:56 -0700)
commit8dc1775dce10d5e47d2805665804fddf39ea3a90
treec8929cedb667faacd988eb22312dbe7c72728c0a
parentbe72615bcf4d5b7b314d836c5e1b4baa4b65dad1
drm/i915: Attempt to uncouple object after catastrophic failure in unbind

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: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c