Skip to contentSkip to conversation

Remove cpufreq_stats sysfs entries on module unload.

PATCH Dave Jones 1 participant 1 message Jun 12, 2011 CPU frequency scaling framework

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

fyi, I just merged the patch below.

Dave

---
[CPUFREQ] Remove cpufreq_stats sysfs entries on module unload.

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).

drivers/cpufreq/cpufreq_stats.c +1 -0
index b60a4c2..853f92d 100644
@@ -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);
 	}
 }