Skip to content

Commit

Permalink
[CPUFREQ] Remove cpufreq_stats sysfs entries on module unload.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
  • Loading branch information
Dave Jones committed Jun 12, 2011
1 parent 89b882a commit 13f0675
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 13f0675

Please sign in to comment.