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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7752148.JjTSgAt1Xy@vostro.rjw.lan>
Date:	Thu, 01 Aug 2013 21:21:35 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	Viresh Kumar <viresh.kumar@...aro.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, cpufreq@...r.kernel.org,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>
Subject: Re: [RFC][PATCH] cpufreq: Do not hold driver module references for additional policy CPUs

On Friday, August 02, 2013 12:31:23 AM Srivatsa S. Bhat wrote:
> On 08/02/2013 12:31 AM, Rafael J. Wysocki wrote:
> > On Thursday, August 01, 2013 11:36:49 PM Srivatsa S. Bhat wrote:
> >> Its the cpufreq_cpu_get() hidden away in cpufreq_add_dev_symlink(). With
> >> that taken care of, everything should be OK. Then we can change the
> >> synchronization part to avoid using refcounts.
> > 
> > So I actually don't see why cpufreq_add_dev_symlink() needs to call
> > cpufreq_cpu_get() at all, since the policy refcount is already 1 at the
> > point it is called and the bumping up of the driver module refcount is
> > pointless.
> > 
> 
> Hmm, yes, it seems so.
> 
> > However, if I change that I also need to change the piece of code that
> > calls the complementary cpufreq_cpu_put() and I kind of cannot find it.
> > 
> 
> ... I guess that's because you are looking at the code with your patch
> applied (and your patch removed that _put()) ;-)

No, it's not that one.  That one was complementary to the cpufreq_cpu_get()
done by cpufreq_add_policy_cpu() before my patch.  Since my patch changes
cpufreq_add_policy_cpu() to call cpufreq_cpu_put() before returning and
bump up the policy refcount with kobject_get(), the one in
__cpufreq_remove_dev() is changed into kobject_put() (correctly, IMO).

What gives?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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