| Date | Thu, 13 Apr 2017 08:18:27 +0530 | From | Viresh Kumar <> | Subject | Re: [patch 11/13] cpufreq/sparc-us3: Replace racy task affinity logic |
| |
On 12-04-17, 22:07, Thomas Gleixner wrote: > The access to the safari config register in the CPU frequency functions > must be executed on the target CPU. This is achieved by temporarily setting > the affinity of the calling user space thread to the requested CPU and > reset it to the original affinity afterwards. > > That's racy vs. CPU hotplug and concurrent affinity settings for that > thread resulting in code executing on the wrong CPU and overwriting the > new affinity setting. > > Replace it by a straight forward smp function call. > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> > Cc: Viresh Kumar <viresh.kumar@linaro.org> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: linux-pm@vger.kernel.org > --- > drivers/cpufreq/sparc-us3-cpufreq.c | 46 ++++++++++++------------------------ > 1 file changed, 16 insertions(+), 30 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-- viresh
|