]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/nouveau: Fix ordering between TTM and GEM release
authorThierry Reding <treding@nvidia.com>
Mon, 16 Sep 2019 14:19:25 +0000 (16:19 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 17 Sep 2019 04:50:16 +0000 (14:50 +1000)
When the last reference to a TTM BO is dropped, ttm_bo_release() will
acquire the DMA reservation object's wound/wait mutex while trying to
clean up (ttm_bo_cleanup_refs_or_queue() via ttm_bo_release()). It is
therefore essential that drm_gem_object_release() be called after the
TTM BO has been uninitialized, otherwise drm_gem_object_release() has
already destroyed the wound/wait mutex (via dma_resv_fini()).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

No differences found