diff options
| author | Marek Skuczynski <mareksk7@gmail.com> | 2010-01-30 16:29:32 -0500 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2010-02-01 21:32:23 -0500 |
| commit | bc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (patch) | |
| tree | b4256cc3274cb431d067bae35fe204ac3dac0fa2 | |
| parent | 00b3e0a2e059f0601feb537b995b0b4de531b543 (diff) | |
sh: Fix access to released memory in clk_debugfs_register_one()
Signed-off-by: Marek Skuczynski <mareksk7@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| -rw-r--r-- | arch/sh/kernel/cpu/clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index f3a46be2ae81..83da5debeedf 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
| @@ -598,7 +598,7 @@ static struct dentry *clk_debugfs_root; | |||
| 598 | static int clk_debugfs_register_one(struct clk *c) | 598 | static int clk_debugfs_register_one(struct clk *c) |
| 599 | { | 599 | { |
| 600 | int err; | 600 | int err; |
| 601 | struct dentry *d, *child; | 601 | struct dentry *d, *child, *child_tmp; |
| 602 | struct clk *pa = c->parent; | 602 | struct clk *pa = c->parent; |
| 603 | char s[255]; | 603 | char s[255]; |
| 604 | char *p = s; | 604 | char *p = s; |
| @@ -630,7 +630,7 @@ static int clk_debugfs_register_one(struct clk *c) | |||
| 630 | 630 | ||
| 631 | err_out: | 631 | err_out: |
| 632 | d = c->dentry; | 632 | d = c->dentry; |
| 633 | list_for_each_entry(child, &d->d_subdirs, d_u.d_child) | 633 | list_for_each_entry_safe(child, child_tmp, &d->d_subdirs, d_u.d_child) |
| 634 | debugfs_remove(child); | 634 | debugfs_remove(child); |
| 635 | debugfs_remove(c->dentry); | 635 | debugfs_remove(c->dentry); |
| 636 | return err; | 636 | return err; |
