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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 13 Jan 2017 00:52:59 -0800
From:   Stephen Boyd <sboyd@...eaurora.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Rafael Wysocki <rjw@...ysocki.net>,
        Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
        linaro-kernel@...ts.linaro.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [PATCH 06/12] PM / OPP: Add 'struct kref' to struct dev_pm_opp

On 01/10, Viresh Kumar wrote:
> On 09-01-17, 15:44, Stephen Boyd wrote:
> > On 12/07, Viresh Kumar wrote:
> > > Add kref to struct dev_pm_opp for easier accounting of the OPPs.
> > > 
> > > Note that the OPPs are freed under the opp_table->lock mutex only.
> > 
> > I'm lost. Why add another level of krefs?
> 
> Heh. The earlier krefs were for the OPP table itself, so that it gets freed once
> there are no more users of it.
> 
> The kref introduced now is for individual OPPs, so that they don't disappear
> while being used and gets freed once all are done.
> 
> Also note that the OPP table will get freed only after all the OPPs are freed,
> plus there are no more users left, like platform code which might have set
> suppoerted-hw property.
> 

What still doesn't make sense is how an individual OPP could go
away without the table that the OPP lives in also going away. If
an OPP is going away while a driver has a reference to it, then
the driver using that OPP should probably not be using it. TL;DR
letting drivers use OPP pointers outside of the OPP core feels
racy.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ