aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/timer-imx-gpt.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2015-08-17 17:18:48 +0000
committerThomas Gleixner <[email protected]>2015-08-18 13:31:16 +0000
commitd0023a1448abdcc892b8bca631e74bb1888efd02 (patch)
tree5fb4ee814e797e980136e7b8623e17648d552121 /drivers/clocksource/timer-imx-gpt.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 (diff)
downloadkernel-d0023a1448abdcc892b8bca631e74bb1888efd02.tar.gz
kernel-d0023a1448abdcc892b8bca631e74bb1888efd02.zip
timer: Write timer->flags atomically
lock_timer_base() cannot prevent the following : CPU1 ( in __mod_timer() timer->flags |= TIMER_MIGRATING; spin_unlock(&base->lock); base = new_base; spin_lock(&base->lock); // The next line clears TIMER_MIGRATING timer->flags &= ~TIMER_BASEMASK; CPU2 (in lock_timer_base()) see timer base is cpu0 base spin_lock_irqsave(&base->lock, *flags); if (timer->flags == tf) return base; // oops, wrong base timer->flags |= base->cpu // too late We must write timer->flags in one go, otherwise we can fool other cpus. Fixes: bc7a34b8b9eb ("timer: Reduce timer migration overhead if disabled") Signed-off-by: Eric Dumazet <[email protected]> Cc: Jon Christopherson <[email protected]> Cc: David Miller <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Sander Eikelenboom <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]> Cc: Thomas Gleixner <[email protected]>
Diffstat (limited to 'drivers/clocksource/timer-imx-gpt.c')
0 files changed, 0 insertions, 0 deletions