[Devel] [PATCH RHEL8 COMMIT] ms/drm/qxl: qxl_release leak in qxl_draw_dirty_fb()

Konstantin Khorenko khorenko at virtuozzo.com
Thu Apr 30 19:13:31 MSK 2020


The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.3.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.3.7
------>
commit e3e5e4849a8a82b2c6c707b46d7c7a91606f9c3d
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Mon Apr 27 14:05:57 2020 +0300

    ms/drm/qxl: qxl_release leak in qxl_draw_dirty_fb()
    
    "ret" should be changed to release allocated struct qxl_release.
    
    Cc: stable at vger.kernel.org
    mFixes: 8002db6336dd ("qxl: convert qxl driver to proper use for reservations")
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 drivers/gpu/drm/qxl/qxl_draw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c
index 4d8681e84e68..67f3bdeaa3bf 100644
--- a/drivers/gpu/drm/qxl/qxl_draw.c
+++ b/drivers/gpu/drm/qxl/qxl_draw.c
@@ -348,9 +348,10 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,
 		goto out_release_backoff;
 
 	rects = drawable_set_clipping(qdev, num_clips, clips_bo);
-	if (!rects)
+	if (!rects) {
+		ret = -EINVAL;
 		goto out_release_backoff;
-
+	}
 	drawable = (struct qxl_drawable *)qxl_release_map(qdev, release);
 
 	drawable->clip.type = SPICE_CLIP_TYPE_RECTS;


More information about the Devel mailing list