[PATCH] OMAP:clock: missing list_del for clk_notifier_unregister

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From b30537e692ac7e72858479327935b16813ea3f56 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@xxxxxx>
Date: Wed, 11 Mar 2009 11:29:11 -0500
Subject: [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister

Apologies on the spam.. looks like my git-send-email needs a bit more
tweaking :(.. sending from gmail..

clk_notifier_unregister should clean the list before
freeing clock notifier, else clk_notifier_list is
filled with dangling pointers

Issue seen while repetative loading/unloading of bridgedriver

Ref: http://marc.info/?t=123678326300002&r=1&w=2

Signed-off-by: Nishanth Menon <nm@xxxxxx>
---
 arch/arm/plat-omap/clock.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index c8d9e96..523d1b0 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -725,8 +725,11 @@ int clk_notifier_unregister(struct clk *clk, struct
notifier_block *nb)
          * XXX ugh, layering violation.  there should be some
          * support in the notifier code for this.
          */
-        if (!cn->notifier_head.head)
+        if (!cn->notifier_head.head) {
+            /* Free up my clock node too */
+            list_del(&cn->node);
             kfree(cn);
+        }
 
     } else {
         r = -ENOENT;
-- 
1.5.4.3


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux