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

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


commit df42286ed7ab7cb1c9935ff4c1a7ce583096a326
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 0783267..8428571 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -788,6 +788,7 @@ Patch25137: cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch
 Patch25142: iwlwifi-dvm-dont-override-mac80211-queue-setting.patch
 
 Patch25143: drm-qxl-backport-fixes-for-Fedora.patch
+Patch25160: drm-qxl-fix-memory-leak-in-release-list-handling.patch
 
 Patch25144: Input-evdev-fall-back-to-vmalloc-for-client-event-buffer.patch
 
@@ -1552,6 +1553,7 @@ ApplyPatch cifs-Allow-LANMAN-auth-for-unencapsulated-auth-methods.patch
 ApplyPatch iwlwifi-dvm-dont-override-mac80211-queue-setting.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
 
@@ -2432,6 +2434,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