From: Chris Wilson Date: Fri, 21 Mar 2014 07:40:56 +0000 (+0000) Subject: drm/i915: Fix unsafe loop iteration over vma whilst unbinding them X-Git-Tag: v3.15-rc1~51^2~18^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df6f783a4ef6790780a67c491897ac45c4618735;p=pandora-kernel.git 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 3089c6f239d7d2c4cb2dd5c353e8984cf79af1d7 Author: Ben Widawsky 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 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76384 Signed-off-by: Chris Wilson Cc: Ben Widawsky Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter --- Reading git-diff-tree failed