소스 검색

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

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: stable@kernel.org
Dave Jones 14 년 전
부모
커밋
13f067537f
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      drivers/cpufreq/cpufreq_stats.c

+ 1 - 0
drivers/cpufreq/cpufreq_stats.c

@@ -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);
 	}
 }