diff options
Diffstat (limited to 'linux-core/drm_bo.c')
-rw-r--r-- | linux-core/drm_bo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index d176392a..8e51985e 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -1115,6 +1115,7 @@ static int drm_bo_handle_wait(drm_file_t * priv, uint32_t handle, if (!bo) { return -EINVAL; } + mutex_lock(&bo->mutex); ret = drm_bo_wait_unfenced(bo, no_wait, 0); if (ret) @@ -1124,10 +1125,11 @@ static int drm_bo_handle_wait(drm_file_t * priv, uint32_t handle, goto out; drm_bo_fill_rep_arg(bo, rep); + out: mutex_unlock(&bo->mutex); drm_bo_usage_deref_unlocked(bo->dev, bo); - return 0; + return ret; } /* |