diff options
| author | Todd Poynor <toddpoynor@google.com> | 2012-12-18 17:50:44 -0800 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2016-02-16 13:52:49 -0800 |
| commit | 583695f13bbcc33f356a3fe598c30b10bd0c5c48 (patch) | |
| tree | 15d9b6cab7fe4a349f2f246a46ee2ad223c1587e /tools/perf/scripts/python | |
| parent | 74f0d695dd30194ecd9edebb10a4375abc4d79fb (diff) | |
cpufreq: interactive: fix racy timer stopping
When stopping the governor, del_timer_sync() can race against an
invocation of the idle notifier callback, which has the potential
to reactivate the timer.
To fix this issue, a read-write semaphore is used. Multiple readers are
allowed as long as pcpu->governor_enabled is true. However it can be
moved to false only after taking a write semaphore which would wait for
any on-going asynchronous activities to complete and prevent any more of
those activities to be initiated.
[toddpoynor@google.com: cosmetic and commit text changes]
Change-Id: Ib51165a735d73dcf964a06754c48bdc1913e13d0
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
