summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2011-06-13 00:35:28 +0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-05-17 19:20:49 +0400
commitd53072db239de81ccd71292cc08bdaf682814632 (patch)
treeeb15f16cc7fa5c7a82c029f31befe46be1356ba3 /drivers/cpufreq
parentd9dedaec02803e205adc5e29f07ccd9fc61295d9 (diff)
downloadlinux-d53072db239de81ccd71292cc08bdaf682814632.tar.xz
Remove cpufreq_stats sysfs entries on module unload.
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: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 4f1b8de2c9f3..7c7a1e481c0d 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -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);
}
}