All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@pwsan.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap@vger.kernel.org, Richard Woodruff <r-woodruff2@ti.com>,
	Rajendra Nayak <rnayak@ti.com>, Ramesh Gupta <grgupta@ti.com>,
	Palande Ameya <ameya.palande@nokia.com>
Subject: Re: [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister
Date: Thu, 12 Mar 2009 01:30:48 -0600 (MDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0903120128570.26959@utopia.booyaka.com> (raw)
In-Reply-To: <1236790153-9324-1-git-send-email-nm@ti.com>

Hi,

On Wed, 11 Mar 2009, Nishanth Menon wrote:

> 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
> 

Thanks, this looks good.

Just to clarify, this is currently against the PM branch.  There's a new 
version of the clock notifier patch coming out soon against l-o; will roll 
this fix in.


- Paul

       reply	other threads:[~2009-03-12  7:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1236790153-9324-1-git-send-email-nm@ti.com>
2009-03-12  7:30 ` Paul Walmsley [this message]
2009-03-12  7:33   ` [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister Menon, Nishanth
2009-03-12 14:22     ` Kevin Hilman
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 17:59       ` [PATCH] OMAP:clock: missing list_del for clk_notifier_unregister Nishanth Menon

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=alpine.DEB.2.00.0903120128570.26959@utopia.booyaka.com \
    --to=paul@pwsan.com \
    --cc=ameya.palande@nokia.com \
    --cc=grgupta@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.