]> git.kernelconcepts.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)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:56 +0000 (13:54 -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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/cpufreq/cpufreq_stats.c

index 4f1b8de2c9f3913823f9b3bde5318cfb3e85e003..7c7a1e481c0dae69deb38a3b1375f9c35edc2bee 100644 (file)
@@ -388,6 +388,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);
        }
 }