summaryrefslogtreecommitdiffstats
path: root/include/asm-generic/tlbflush.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-10-08 19:32:04 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-10-14 15:51:49 +0200
commitff229eee3d897f52bd001c841f2d3cce8853ecdc (patch)
treeff2aeaf672e1e411d2054ca722f7d0e84eec72f6 /include/asm-generic/tlbflush.h
parentLinux 5.4-rc3 (diff)
downloadlinux-ff229eee3d897f52bd001c841f2d3cce8853ecdc.tar.xz
linux-ff229eee3d897f52bd001c841f2d3cce8853ecdc.zip
hrtimer: Annotate lockless access to timer->base
Followup to commit dd2261ed45aa ("hrtimer: Protect lockless access to timer->base") lock_hrtimer_base() fetches timer->base without lock exclusion. Compiler is allowed to read timer->base twice (even if considered dumb) which could end up trying to lock migration_base and return &migration_base. base = timer->base; if (likely(base != &migration_base)) { /* compiler reads timer->base again, and now (base == &migration_base) raw_spin_lock_irqsave(&base->cpu_base->lock, *flags); if (likely(base == timer->base)) return base; /* == &migration_base ! */ Similarly the write sides must use WRITE_ONCE() to avoid store tearing. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20191008173204.180879-1-edumazet@google.com
Diffstat (limited to 'include/asm-generic/tlbflush.h')
0 files changed, 0 insertions, 0 deletions