summaryrefslogtreecommitdiff
path: root/sound/arm
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-10-24 09:55:10 (GMT)
committerThomas Gleixner <tglx@linutronix.de>2016-10-25 14:27:39 (GMT)
commit4da9152a4308dcbf611cde399c695c359fc9145f (patch)
treeef634a7c192d03dd1f04b82f20ef58e78b55b3be /sound/arm
parentb831275a3553c32091222ac619cfddd73a5553fb (diff)
downloadlinux-4da9152a4308dcbf611cde399c695c359fc9145f.tar.xz
timers: Lock base for same bucket optimization
Linus stumbled over the unlocked modification of the timer expiry value in mod_timer() which is an optimization for timers which stay in the same bucket - due to the bucket granularity - despite their expiry time getting updated. The optimization itself still makes sense even if we take the lock, because in case that the bucket stays the same, we avoid the pointless queue/enqueue dance. Make the check and the modification of timer->expires protected by the base lock and shuffle the remaining code around so we can keep the lock held when we actually have to requeue the timer to a different bucket. Fixes: f00c0afdfa62 ("timers: Implement optimization for same expiry time in mod_timer()") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610241711220.4983@nanos Cc: stable@vger.kernel.org Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'sound/arm')
0 files changed, 0 insertions, 0 deletions