lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpo=9G+ebAxfOxkhQneEz2Vc_rfnR=he65WiZ4ERfmy-erg@mail.gmail.com>
Date:	Wed, 6 Feb 2013 21:49:40 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Dirk Brandewie <dirk.brandewie@...il.com>
Cc:	linux-kernel@...r.kernel.org, cpufreq@...r.kernel.org,
	Dirk Brandewie <dirk.j.brandewie@...el.com>
Subject: Re: [PATCH 5/7] cpufreq: balance out cpufreq_cpu_{get,put} for
 scaling drivers using setpolicy

On 6 February 2013 21:41, Dirk Brandewie <dirk.brandewie@...il.com> wrote:
> our files are clearly out of sync :-)  The code in cpufreq_add_dev() is

I was at latest bleeding-edge then, but i still have below code in my HEAD.

> #ifdef CONFIG_SMP
>         /* check whether a different CPU already registered this
>          * CPU because it is in the same boat. */
>         policy = cpufreq_cpu_get(cpu);
>         if (unlikely(policy)) {
>                 cpufreq_cpu_put(policy);
>                 return 0;
>         }
>
> The reference added by this cpufreq_cpu_get() is finally dropped in
> __cpufreq_remove_dev() with the call to __cpufreq_governor()

__cpufreq_governor() is not calling cpufreq_cpu_put() at all and is dropping
reference for the governor only, not for policy.

>         if (driver->target)
>                 __cpufreq_governor(data, CPUFREQ_GOV_STOP);
>
> Without this change I hang at:
>                 pr_debug("waiting for dropping of refcount\n");
>                 wait_for_completion(cmp);

Below should have fixed it for you i believe.

	pr_debug("%s: removing link, cpu: %d\n", __func__, cpu);
	cpufreq_cpu_put(data);
	unlock_policy_rwsem_write(cpu);

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ