diff options
| author | Ben Segall <[email protected]> | 2013-10-16 18:16:22 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2013-10-29 11:02:21 +0000 |
| commit | 927b54fccbf04207ec92f669dce6806848cbec7d (patch) | |
| tree | 4ee5a37f4796df9883c6beb9b7a91ca8c8534049 /lib/spinlock_debug.c | |
| parent | sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining (diff) | |
| download | kernel-927b54fccbf04207ec92f669dce6806848cbec7d.tar.gz kernel-927b54fccbf04207ec92f669dce6806848cbec7d.zip | |
sched: Fix hrtimer_cancel()/rq->lock deadlock
__start_cfs_bandwidth calls hrtimer_cancel while holding rq->lock,
waiting for the hrtimer to finish. However, if sched_cfs_period_timer
runs for another loop iteration, the hrtimer can attempt to take
rq->lock, resulting in deadlock.
Fix this by ensuring that cfs_b->timer_active is cleared only if the
_latest_ call to do_sched_cfs_period_timer is returning as idle. Then
__start_cfs_bandwidth can just call hrtimer_try_to_cancel and wait for
that to succeed or timer_active == 1.
Signed-off-by: Ben Segall <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/20131016181622.22647.16643.stgit@sword-of-the-dawn.mtv.corp.google.com
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'lib/spinlock_debug.c')
0 files changed, 0 insertions, 0 deletions
