]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/qxl: unref cursor bo when finished with it
authorRay Strode <rstrode@redhat.com>
Mon, 27 Nov 2017 21:50:09 +0000 (16:50 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:27:10 +0000 (08:27 -0600)
BugLink: http://bugs.launchpad.net/bugs/1751131
commit 16c6db3688734b27487a42d0c2a1062d0b2bad03 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/gpu/drm/qxl/qxl_display.c

index 4756b3c9bf2cabadd7811accf1057e61c6426825..7335d99244d5b1e6e98ca16e873bfe5d09691a4d 100644 (file)
@@ -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: