From: Nishanth Menon <menon.nishanth@gmail.com>
To: "Woodruff, Richard" <r-woodruff2@ti.com>, ameya.palande@nokia.com
Cc: "Menon, Nishanth" <nm@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
ext Paul Walmsley <paul@pwsan.com>,
"Nayak, Rajendra" <rnayak@ti.com>,
"Gupta, Ramesh" <grgupta@ti.com>
Subject: [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister
Date: Wed, 11 Mar 2009 19:59:40 +0200 [thread overview]
Message-ID: <49B7FC0C.9080408@gmail.com> (raw)
In-Reply-To: <13B9B4C6EF24D648824FF11BE8967162037B763B7D@dlee02.ent.ti.com>
>From b30537e692ac7e72858479327935b16813ea3f56 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
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@ti.com>
---
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
next prev parent reply other threads:[~2009-03-11 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 14:51 DSPBRIDGE+BRIDGE_DVFS: Crashes on multiple reload Menon, Nishanth
2009-03-11 15:27 ` Woodruff, Richard
2009-03-11 16:32 ` Menon, Nishanth
2009-03-11 16:40 ` Woodruff, Richard
2009-03-11 16:55 ` Menon, Nishanth
2009-03-11 17:59 ` Nishanth Menon [this message]
2009-03-11 15:54 ` Nayak, Rajendra
2009-03-11 15:58 ` Gupta, Ramesh
[not found] <1236790153-9324-1-git-send-email-nm@ti.com>
2009-03-12 7:30 ` [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister Paul Walmsley
2009-03-12 7:33 ` Menon, Nishanth
2009-03-12 14:22 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49B7FC0C.9080408@gmail.com \
--to=menon.nishanth@gmail.com \
--cc=ameya.palande@nokia.com \
--cc=grgupta@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=paul@pwsan.com \
--cc=r-woodruff2@ti.com \
--cc=rnayak@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox