aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-02 15:47:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-02 15:47:51 -0500
commit7fbcca25c0bf8679a751034f65428ff6291cd4ca (patch)
treea6a8ad40e72bb8a4b679c761f1cee3480a264e51 /arch
parente770a0f1154193ca6b6e720a86aeaa2edc9261c6 (diff)
parentbc10e875d4aeaa93a0d418d8b4346b72f5067ea0 (diff)
Merge branch 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix access to released memory in clk_debugfs_register_one() sh: Fix access to released memory in dwarf_unwinder_cleanup() usb: r8a66597-hdc disable interrupts fix spi: spi_sh_msiof: Fixed data sampling on the correct edge
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/cpu/clock.c4
-rw-r--r--arch/sh/kernel/dwarf.c8
2 files changed, 6 insertions, 6 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;
598static int clk_debugfs_register_one(struct clk *c) 598static 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
631err_out: 631err_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;
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c
index 3576b709f052..88d28ec3780a 100644
--- a/arch/sh/kernel/dwarf.c
+++ b/arch/sh/kernel/dwarf.c
@@ -892,18 +892,18 @@ static struct unwinder dwarf_unwinder = {
892 892
893static void dwarf_unwinder_cleanup(void) 893static void dwarf_unwinder_cleanup(void)
894{ 894{
895 struct dwarf_cie *cie; 895 struct dwarf_cie *cie, *cie_tmp;
896 struct dwarf_fde *fde; 896 struct dwarf_fde *fde, *fde_tmp;
897 897
898 /* 898 /*
899 * Deallocate all the memory allocated for the DWARF unwinder. 899 * Deallocate all the memory allocated for the DWARF unwinder.
900 * Traverse all the FDE/CIE lists and remove and free all the 900 * Traverse all the FDE/CIE lists and remove and free all the
901 * memory associated with those data structures. 901 * memory associated with those data structures.
902 */ 902 */
903 list_for_each_entry(cie, &dwarf_cie_list, link) 903 list_for_each_entry_safe(cie, cie_tmp, &dwarf_cie_list, link)
904 kfree(cie); 904 kfree(cie);
905 905
906 list_for_each_entry(fde, &dwarf_fde_list, link) 906 list_for_each_entry_safe(fde, fde_tmp, &dwarf_fde_list, link)
907 kfree(fde); 907 kfree(fde);
908 908
909 kmem_cache_destroy(dwarf_reg_cachep); 909 kmem_cache_destroy(dwarf_reg_cachep);