drm/i915/selftests: Hold the vma manager lock while modifying mmap_offset
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 11 Jul 2019 06:51:59 +0000 (07:51 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 11 Jul 2019 15:26:05 +0000 (16:26 +0100)
commitf63dfc1464380833c6a2c8daa1b767c6020565af
treefd0996e8b14af630ff219a7c57ecff4a97f51e3f
parent5a5efbf4ef504a8136963a8ae10a3c0a1d59b479
drm/i915/selftests: Hold the vma manager lock while modifying mmap_offset

Right idea, wrong lock. We already drop struct_mutex before we free the
mmap_offset when freeing the object, so we need to take the vma manager
lock when manipulating the mmap_offset address space for our selftests.

Fixes: 8221d21b0664 ("drm/i915/selftests: Lock the drm_mm while modifying")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190711065215.4004-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c