]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
CPUFREQ: Remove cpufreq_stats sysfs entries on module unload.
authorDave Jones <davej@redhat.com>
Sun, 12 Jun 2011 20:35:28 +0000 (16:35 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:24:07 +0000 (15:24 -0700)
commit 13f067537f34456443f61c950cd6dc37d1d5f3ee upstream.

cpufreq_stats leaves behind its sysfs entries, which causes a panic
when something stumbled across them.
(Discovered by unloading cpufreq_stats while powertop was loaded).

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/cpufreq/cpufreq_stats.c

index c31aab02f40a2086bba47d1c3c30ee6228685197..6bbc164caa9e1beb721da7baae13ee3270c69f3d 100644 (file)
@@ -387,6 +387,7 @@ static void __exit cpufreq_stats_exit(void)
        unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
        for_each_online_cpu(cpu) {
                cpufreq_stats_free_table(cpu);
+               cpufreq_stats_free_sysfs(cpu);
        }
 }