]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix unsafe loop iteration over vma whilst unbinding them
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Mar 2014 07:40:56 +0000 (07:40 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 21 Mar 2014 15:13:08 +0000 (16:13 +0100)
commit590d665ce6a8a907f51977445fd3a3a2c7803096
treeef6e84fa4126674c02770514ffdf7a8c9f9b20e6
parent8cbe3ff246b9ab4020a51d70514d8fa91bf481ab
drm/i915: Fix unsafe loop iteration over vma whilst unbinding them

On non-LLC platforms, when changing the cache level of an object, we may
need to unbind it so that prefetching across page boundaries does not
cross into a different memory domain. This requires us to unbind
conflicting vma, but we did so iterating over the objects vma in an
unsafe manner (as the list was being modified as we iterated).

The regression was introduced in
commit c420a143ec9201cc382ad22c2e2548c0d02636d7
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Wed Jul 31 17:00:03 2013 -0700

    drm/i915: make caching operate on all address spaces
apparently as far back as v3.12-rc1, but it has only just begun to
trigger real world bug reports.

Reported-and-tested-by: Nikolay Martynov <mar.kolya@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76384
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c