]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/ttm: once more fix ttm_buffer_object_transfer
authorChristian König <christian.koenig@amd.com>
Mon, 30 Oct 2017 13:57:43 +0000 (14:57 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Oct 2017 21:54:12 +0000 (17:54 -0400)
When the mutex is locked just in the moment we copy it we end up with a
warning that we release a locked mutex.

Fix this by properly reinitializing the mutex.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo_util.c

index 78cb99be714626d742abf51158a63169d910e0ee..e7a519f1849b7b72d0d21fd3af44c753a5dfb81c 100644 (file)
@@ -474,6 +474,7 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
        INIT_LIST_HEAD(&fbo->lru);
        INIT_LIST_HEAD(&fbo->swap);
        INIT_LIST_HEAD(&fbo->io_reserve_lru);
+       mutex_init(&fbo->wu_mutex);
        fbo->moving = NULL;
        drm_vma_node_reset(&fbo->vma_node);
        atomic_set(&fbo->cpu_writers, 0);