• steven finney's avatar
    [CPUFREQ] Fix memory leak in cpufreq_stat · 98586ed8
    steven finney authored
    When a CPU is taken offline in an SMP system, cpufreq_remove_dev()
    nulls out the per-cpu policy before cpufreq_stats_free_table() can
    make use of it.  cpufreq_stats_free_table() then skips the
    call to sysfs_remove_group(), leaving about 100 bytes of sysfs-related
    memory unclaimed each time a CPU-removal occurs. Break up
    cpu_stats_free_table into sysfs and table portions, and
    call the sysfs portion early.
    Signed-off-by: default avatarSteven Finney <steven.finney@palm.com>
    Signed-off-by: default avatarDave Jones <davej@redhat.com>
    Cc: stable@kernel.org
    98586ed8
cpufreq_stats.c 9.98 KB