linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/9] omap: Fix access to already released memory in clk_debugfs_register_one()
Date: Tue, 02 Feb 2010 18:26:16 -0800	[thread overview]
Message-ID: <20100203022616.26347.80630.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100203022318.26347.34734.stgit@baageli.muru.com>

From: Marek Skuczynski <mareksk7@gmail.com>

I have found an access to already released memory in
clk_debugfs_register_one() function.

Signed-off-by: Marek Skuczynski <mareksk7@gmail.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/plat-omap/clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index d9f8c84..4becbdd 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -391,7 +391,7 @@ static struct dentry *clk_debugfs_root;
 static int clk_debugfs_register_one(struct clk *c)
 {
 	int err;
-	struct dentry *d, *child;
+	struct dentry *d, *child, *child_tmp;
 	struct clk *pa = c->parent;
 	char s[255];
 	char *p = s;
@@ -423,7 +423,7 @@ static int clk_debugfs_register_one(struct clk *c)
 
 err_out:
 	d = c->dent;
-	list_for_each_entry(child, &d->d_subdirs, d_u.d_child)
+	list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child)
 		debugfs_remove(child);
 	debugfs_remove(c->dent);
 	return err;

  parent reply	other threads:[~2010-02-03  2:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03  2:25 [PATCH 0/9] omap fixes for 2.6.33-rc6 Tony Lindgren
2010-02-03  2:25 ` [PATCH 1/9] omap: define _toggle_gpio_edge_triggering only for OMAP1 Tony Lindgren
2010-02-03  8:13   ` Uwe Kleine-König
2010-02-03 16:57     ` Tony Lindgren
2010-02-03 17:10       ` Uwe Kleine-König
2010-02-03 17:25         ` Tony Lindgren
2010-02-03  2:25 ` [PATCH 2/9] omap: Remove old unused defines for OMAP_32KSYNCT_BASE Tony Lindgren
2010-02-03  2:26 ` [PATCH 3/9] ARCH OMAP : enable ARCH_HAS_HOLES_MEMORYMODEL for OMAP Tony Lindgren
2010-02-03  2:26 ` [PATCH 4/9] OMAP2/3: IRQ: ensure valid base address Tony Lindgren
2010-02-03  2:26 ` [PATCH 5/9] OMAP2/3: GPMC: ensure valid clock pointer Tony Lindgren
2010-02-03  2:26 ` [PATCH 6/9] omap: Fix 3630 mux errors Tony Lindgren
2010-02-03  2:26 ` [PATCH 7/9] omap: Fix arch/arm/mach-omap2/mux.c: Off by one error Tony Lindgren
2010-02-03  2:26 ` Tony Lindgren [this message]
2010-02-03  2:26 ` [PATCH 9/9] omap: Disable serial port autoidle by default Tony Lindgren
2010-02-03  3:43   ` Tony Lindgren
2010-02-03 14:40     ` 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=20100203022616.26347.80630.stgit@baageli.muru.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).