On Monday, July 29, 2013 12:11:18 AM Rafael J. Wysocki wrote: > On Sunday, July 28, 2013 12:21:22 PM Toralf Förster wrote: > > On 07/28/2013 01:39 AM, Rafael J. Wysocki wrote: > > > On Saturday, July 27, 2013 07:40:34 PM Toralf Förster wrote: > > >> it gives at a ThinkPad T420: > > >> > > >> tfoerste@n22 ~/tmp $ lsmod | grep ^acpi_cpufreq > > >> acpi_cpufreq 12902 2147483647 > > > > > > That is -1, which indicates some module refcount woes. > > > > yes, ofc. > > > > The issue apears after 1 s2ram/resume cycle, before s2ram the refcount is 1. > > > > > I definitely can't see that with the mainline on my machines. > > > > It is in mainline too. > > Does the appended patch help? Actually, something as simple as this also should help: --- From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Subject: cpufreq: Fix cpufreq driver module refcount balance after suspend/resume Since cpufreq_cpu_put() called by __cpufreq_remove_dev() drops the driver module refcount, __cpufreq_remove_dev() causes that refcount to become negative after a suspend/resume cycle, for example. To prevent this from happening make __cpufreq_remove_dev() put the policy kobject only instead of calling cpufreq_cpu_put(). Reported-by: Toralf Förster <toralf.foerster@xxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-pm/drivers/cpufreq/cpufreq.c =================================================================== --- linux-pm.orig/drivers/cpufreq/cpufreq.c +++ linux-pm/drivers/cpufreq/cpufreq.c @@ -1181,7 +1181,7 @@ static int __cpufreq_remove_dev(struct d __cpufreq_governor(data, CPUFREQ_GOV_POLICY_EXIT); pr_debug("%s: removing link, cpu: %d\n", __func__, cpu); - cpufreq_cpu_put(data); + kobject_put(&data->kobj); /* If cpu is last user of policy, free policy */ if (cpus == 1) { -- To unsubscribe from this list: send the line "unsubscribe cpufreq" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html