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:	Fri, 13 Sep 2013 21:33:26 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	Patch Tracking <patches@...aro.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 181/228] cpufreq: move freq change notifications to
 cpufreq core

On 13 September 2013 21:23, Russell King - ARM Linux
<linux@....linux.org.uk> wrote:
> On Fri, Sep 13, 2013 at 06:32:07PM +0530, Viresh Kumar wrote:
>> +             read_lock_irqsave(&cpufreq_driver_lock, flags);
>> +             notify = !(cpufreq_driver->flags & CPUFREQ_ASYNC_NOTIFICATION);
>> +             read_unlock_irqrestore(&cpufreq_driver_lock, flags);
>
> I don't think this needs to be read under a lock - if this bit changes
> dynamically, then there's something very wrong.

No it doesn't change dynamically.. Was a mistake..
Following change folded into the original commit (attached)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 2c1ae708..bb7402d 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1802,7 +1802,6 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
        else if (cpufreq_driver->target_index) {
                struct cpufreq_frequency_table *freq_table;
                struct cpufreq_freqs freqs;
-               unsigned long flags;
                bool notify;
                int index;

@@ -1824,9 +1823,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
                        goto out;
                }

-               read_lock_irqsave(&cpufreq_driver_lock, flags);
                notify = !(cpufreq_driver->flags & CPUFREQ_ASYNC_NOTIFICATION);
-               read_unlock_irqrestore(&cpufreq_driver_lock, flags);

                if (notify) {
                        freqs.old = policy->cur;

Download attachment "0181-cpufreq-move-freq-change-notifications-to-cpufreq-co.patch" of type "application/octet-stream" (2729 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ