[kernel/stabilization] Fix memory leak in qxl (from Dave Airlie)

Josh Boyer jwboyer at fedoraproject.org
Fri Nov 29 15:25:31 UTC 2013


commit d791273b5d4ff1e8c64fe4537a6b64725ee6b6c1
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Fri Nov 29 10:23:44 2013 -0500

    Fix memory leak in qxl (from Dave Airlie)

 ...-fix-memory-leak-in-release-list-handling.patch |   27 ++++++++++++++++++++
 kernel.spec                                        |    5 +++
 2 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/drm-qxl-fix-memory-leak-in-release-list-handling.patch b/drm-qxl-fix-memory-leak-in-release-list-handling.patch
new file mode 100644
index 0000000..542d027
--- /dev/null
+++ b/drm-qxl-fix-memory-leak-in-release-list-handling.patch
@@ -0,0 +1,27 @@
+From 1b28c3e628315ac0d9ef2d3fac0403f05ae692db Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Thu, 28 Nov 2013 05:39:03 +0000
+Subject: drm/qxl: fix memory leak in release list handling
+
+wow no idea how I got this far without seeing this,
+leaking the entries in the list makes kmalloc-64 slab grow.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=65121
+Cc: stable at vger.kernel.org
+Reported-by: Matthew Stapleton <matthew4196 at gmail.com>
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+---
+diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
+index 0109a96..821ab7b 100644
+--- a/drivers/gpu/drm/qxl/qxl_release.c
++++ b/drivers/gpu/drm/qxl/qxl_release.c
+@@ -92,6 +92,7 @@ qxl_release_free(struct qxl_device *qdev,
+ 						- DRM_FILE_OFFSET);
+ 		qxl_fence_remove_release(&bo->fence, release->id);
+ 		qxl_bo_unref(&bo);
++		kfree(entry);
+ 	}
+ 	spin_lock(&qdev->release_idr_lock);
+ 	idr_remove(&qdev->release_idr, release->id);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/kernel.spec b/kernel.spec
index 6ed0acb..36d2d3b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -736,6 +736,7 @@ Patch25131: btrfs-relocate-csums-properly-with-prealloc-ext.patch
 Patch25132: rt2800usb-slow-down-TX-status-polling.patch
 
 Patch25140: drm-qxl-backport-fixes-for-Fedora.patch
+Patch25160: drm-qxl-fix-memory-leak-in-release-list-handling.patch
 
 Patch25141: Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch
 
@@ -1479,6 +1480,7 @@ ApplyPatch btrfs-relocate-csums-properly-with-prealloc-ext.patch
 ApplyPatch rt2800usb-slow-down-TX-status-polling.patch
 
 ApplyPatch drm-qxl-backport-fixes-for-Fedora.patch
+ApplyPatch drm-qxl-fix-memory-leak-in-release-list-handling.patch
 
 ApplyPatch Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch
 
@@ -2321,6 +2323,9 @@ fi
 #                                    ||----w |
 #                                    ||     ||
 %changelog
+* Fri Nov 29 2013 Josh Boyer <jwboyer at fedoraproject.org>
+- Fix memory leak in qxl (from Dave Airlie)
+
 * Tue Nov 26 2013 Josh Boyer <jwboyer at fedoraproject.org>
 - Add patch to fix usbnet URB handling (rhbz 998342)
 - Fix crash in via-velocity driver (rhbz 1022733)


More information about the scm-commits mailing list