diff options
author | Colin Cross <ccross@android.com> | 2013-08-23 21:45:12 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-29 22:15:34 +0200 |
commit | 9e19b73c30a5fa42a53583a1f7817dd857126156 (patch) | |
tree | 74447e7a435320f8f87837821ac50863dffcc30c /crypto/wp512.c | |
parent | cpuidle: coupled: abort idle if pokes are pending (diff) | |
download | linux-9e19b73c30a5fa42a53583a1f7817dd857126156.tar.xz linux-9e19b73c30a5fa42a53583a1f7817dd857126156.zip |
cpuidle: coupled: fix race condition between pokes and safe state
The coupled cpuidle waiting loop clears pending pokes before
entering the safe state. If a poke arrives just before the
pokes are cleared, but after the while loop condition checks,
the poke will be lost and the cpu will stay in the safe state
until another interrupt arrives. This may cause the cpu that
sent the poke to spin in the ready loop with interrupts off
until another cpu receives an interrupt, and if no other cpus
have interrupts routed to them it can spin forever.
Change the return value of cpuidle_coupled_clear_pokes to
return if a poke was cleared, and move the need_resched()
checks into the callers. In the waiting loop, if
a poke was cleared restart the loop to repeat the while
condition checks.
Reported-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Colin Cross <ccross@android.com>
Cc: 3.6+ <stable@vger.kernel.org> # 3.6+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions