diff options
author | Ray Strode <rstrode@redhat.com> | 2017-11-28 00:50:09 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-12-08 06:36:54 +0300 |
commit | 16c6db3688734b27487a42d0c2a1062d0b2bad03 (patch) | |
tree | 96b369e76b2aa8db65426f06afbbf657e13f3823 | |
parent | 3f1f0b1c57dd617e9b0ded50efb8d6c011b85b20 (diff) | |
download | linux-16c6db3688734b27487a42d0c2a1062d0b2bad03.tar.xz |
drm/qxl: unref cursor bo when finished with it
qxl_cursor_atomic_update allocs a bo for the cursor that
it never frees up at the end of the function.
This commit fixes that.
Signed-off-by: Ray Strode <rstrode@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_display.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 4756b3c9bf2c..7335d99244d5 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -575,7 +575,7 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, struct qxl_cursor_cmd *cmd; struct qxl_cursor *cursor; struct drm_gem_object *obj; - struct qxl_bo *cursor_bo, *user_bo = NULL; + struct qxl_bo *cursor_bo = NULL, *user_bo = NULL; int ret; void *user_ptr; int size = 64*64*4; @@ -645,6 +645,8 @@ static void qxl_cursor_atomic_update(struct drm_plane *plane, qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false); qxl_release_fence_buffer_objects(release); + qxl_bo_unref(&cursor_bo); + return; out_backoff: |