]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.33 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Mar 2010 00:39:49 +0000 (16:39 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Mar 2010 00:39:49 +0000 (16:39 -0800)
queue-2.6.33/rtc-core-fix-memory-leak.patch [new file with mode: 0644]
queue-2.6.33/series

diff --git a/queue-2.6.33/rtc-core-fix-memory-leak.patch b/queue-2.6.33/rtc-core-fix-memory-leak.patch
new file mode 100644 (file)
index 0000000..1aec248
--- /dev/null
@@ -0,0 +1,32 @@
+From 2a7a06a0cdd86d572e91657603180da5992be6d3 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Fri, 5 Mar 2010 13:44:24 -0800
+Subject: rtc-core: fix memory leak
+
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+
+commit 2a7a06a0cdd86d572e91657603180da5992be6d3 upstream.
+
+The idr should be destroyed when the module is unloaded. Found with
+kmemleak.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Cc: Alessandro Zummo <a.zummo@towertech.it>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/rtc/class.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/rtc/class.c
++++ b/drivers/rtc/class.c
+@@ -226,6 +226,7 @@ static void __exit rtc_exit(void)
+ {
+       rtc_dev_exit();
+       class_destroy(rtc_class);
++      idr_destroy(&rtc_idr);
+ }
+ subsys_initcall(rtc_init);
index 3c9e781ffb5bcb9f08e4bc9b00ba4fc38ef5d329..85f7b4e89746b23aeb589e1a190438650e7c5ea4 100644 (file)
@@ -16,3 +16,4 @@ vfs-take-f_lock-on-modifying-f_mode-after-open-time.patch
 x86-uv-uv_global_gru_mmr_address-macro-fix.patch
 drm-i915-give-up-on-8xx-lid-status.patch
 ath9k-fix-keycache-leak-in-split-tkip-case.patch
+rtc-core-fix-memory-leak.patch