summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-08-23 12:45:12 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 17:18:02 -0700
commit736899ab702dc85345217e124686b661a56ecb6a (patch)
tree1e6bf8771eee1fb9f0cd1c74df61f2234912b37c /arch
parent61704f036693ca93a7d916899288eba9a98b006f (diff)
downloadlinux-3.10-736899ab702dc85345217e124686b661a56ecb6a.tar.gz
linux-3.10-736899ab702dc85345217e124686b661a56ecb6a.tar.bz2
linux-3.10-736899ab702dc85345217e124686b661a56ecb6a.zip
cpuidle: coupled: fix race condition between pokes and safe state
commit 9e19b73c30a5fa42a53583a1f7817dd857126156 upstream. 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> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions