提交 fee280d3 编写于 作者: T Thomas Hellstrom 提交者: Dave Airlie

drm/ttm: Fix a sync object leak.

If there are multiple simultaneous waiters for the same buffer object,
a temporary reference to its sync object may be leaked.
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 c9b7fb54
无相关合并请求
......@@ -1575,6 +1575,10 @@ int ttm_bo_wait(struct ttm_buffer_object *bo,
driver->sync_obj_unref(&sync_obj);
driver->sync_obj_unref(&tmp_obj);
spin_lock(&bo->lock);
} else {
spin_unlock(&bo->lock);
driver->sync_obj_unref(&sync_obj);
spin_lock(&bo->lock);
}
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册