From: Christian König Date: Mon, 30 Oct 2017 13:57:43 +0000 (+0100) Subject: drm/ttm: once more fix ttm_buffer_object_transfer X-Git-Tag: v4.15-rc1~90^2~13^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d98e5ee6084f6d7bc578c5d5f86de7156aaa4cb;p=thirdparty%2Fkernel%2Flinux.git drm/ttm: once more fix ttm_buffer_object_transfer 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 Reviewed-by: Alex Deucher CC: stable@vger.kernel.org Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 78cb99be71462..e7a519f1849b7 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -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);