]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check that the vma hasn't been closed before we insert it
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Feb 2020 12:19:40 +0000 (12:19 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Feb 2020 17:32:27 +0000 (17:32 +0000)
commit9bb034d0bec1de27291ae274eb062fb594c74c07
treea7b692a91805980df0ca004db097b964aa9a9df8
parent4e4605fc3368a2fb7fca3f035b6ced64327b161a
drm/i915: Check that the vma hasn't been closed before we insert it

As there is a delay before we pin a vma, there is an opportunity for
another thread to have closed the vm and its vma (including us).
Check as soon as we acquire the vm->mutex and know the vm/vma is stable.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1291
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200221121940.2741563-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_vma.c