lkml.org 
[lkml]   [2013]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: [PATCH v2 linux-next 2/2] cpufreq: Convert the cpufreq_driver_lock to use the rcu
Date
Argh, your right.  I completely misread that section.
It'll take me a few days to respin and retest properly.

Thanks,
Nate

________________________________________
From: Rafael J. Wysocki [rjw@sisk.pl]
Sent: Monday, February 11, 2013 1:36 PM
To: Nathan Zimmer
Cc: viresh.kumar@linaro.org; linux-kernel@vger.kernel.org; linux-pm@vger.kernel.org; cpufreq@vger.kernel.org
Subject: Re: [PATCH v2 linux-next 2/2] cpufreq: Convert the cpufreq_driver_lock to use the rcu

On Monday, February 11, 2013 05:13:30 PM Nathan Zimmer wrote:
> There are some spots that I need to give a much deeper review, cpufreq_register_driver for example.
>
> But I believe
> > @@ -196,7 +195,7 @@ static void __cpufreq_cpu_put(struct cpufreq_policy *data, bool sysfs)
> > {
> > if (!sysfs)
> > kobject_put(&data->kobj);
> > - module_put(cpufreq_driver->owner);
> > + module_put(rcu_dereference(cpufreq_driver)->owner);
> > }
> would be ok. In the documentation whatisRCU.txt they give a very similar example.

Well, the very same document states the following:

Note that the value returned by rcu_dereference() is valid
only within the enclosing RCU read-side critical section.

Thanks,
Rafael


--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
\
 
 \ /
  Last update: 2013-02-12 05:21    [W:0.133 / U:2.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site