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]
Date:	Sun, 7 Feb 2016 21:24:53 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Linux PM list <linux-pm@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Juri Lelli <juri.lelli@....com>,
	Steve Muckle <steve.muckle@...aro.org>,
	Saravana Kannan <skannan@...eaurora.org>
Subject: Re: [PATCH 2/3] cpufreq: governor: Rearrange governor data structures

On 07-02-16, 21:15, Viresh Kumar wrote:
> On 07-02-16, 16:24, Rafael J. Wysocki wrote:
> >  static int cpufreq_governor_exit(struct cpufreq_policy *policy)
> >  {
> >  	struct dbs_governor *gov = dbs_governor_of(policy);
> > -	struct dbs_data *dbs_data = policy->governor_data;
> > -	struct cpu_dbs_info *cdbs = gov->get_cpu_cdbs(policy->cpu);
> > +	struct policy_dbs_info *policy_dbs = policy->governor_data;
> > +	struct dbs_data *dbs_data = policy_dbs->dbs_data;
> >  
> >  	/* State should be equivalent to INIT */
> > -	if (!cdbs->policy_dbs || cdbs->policy_dbs->policy)
> > +	if (policy_dbs->policy)
> >  		return -EBUSY;
> 
> We can crash here if policy_dbs is NULL, which can happen if EXIT is called
> twice (due to the lock-dropping thing in cpufreq-core). So we really need to
> keep these checks for now atleast.

Well no, things have changed now a bit with your recent changes and so this
wouldn't be an issue here. Sorry for the noise.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ