drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more
authorChristian König <christian.koenig@amd.com>
Mon, 4 Sep 2017 18:58:45 +0000 (20:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Dec 2017 10:26:35 +0000 (11:26 +0100)
commit45d1765032b645a2e86a606f7d173d4bf97a9810
treed68da68985cec4a4ab6570f99b6e57df36bc40a0
parentd48221f3399764748f706cc1126b5d6465e27d87
drm/ttm: fix ttm_bo_cleanup_refs_or_queue once more

commit 378e2d5b504fe0231c557751e58b80fcf717cc20 upstream.

With shared reservation objects __ttm_bo_reserve() can easily fail even on
destroyed BOs. This prevents correct handling when we need to individualize
the reservation object.

Fix this by individualizing the object before even trying to reserve it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/ttm/ttm_bo.c