Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull hrtimer fixlet from Thomas Gleixner:
"A single commit annotating the lockcless access to timer->base with
READ_ONCE() and adding the WRITE_ONCE() counterparts for completeness"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hrtimer: Annotate lockless access to timer->base

+4 -4
+4 -4
kernel/time/hrtimer.c
··· 164 164 struct hrtimer_clock_base *base; 165 165 166 166 for (;;) { 167 - base = timer->base; 167 + base = READ_ONCE(timer->base); 168 168 if (likely(base != &migration_base)) { 169 169 raw_spin_lock_irqsave(&base->cpu_base->lock, *flags); 170 170 if (likely(base == timer->base)) ··· 244 244 return base; 245 245 246 246 /* See the comment in lock_hrtimer_base() */ 247 - timer->base = &migration_base; 247 + WRITE_ONCE(timer->base, &migration_base); 248 248 raw_spin_unlock(&base->cpu_base->lock); 249 249 raw_spin_lock(&new_base->cpu_base->lock); 250 250 ··· 253 253 raw_spin_unlock(&new_base->cpu_base->lock); 254 254 raw_spin_lock(&base->cpu_base->lock); 255 255 new_cpu_base = this_cpu_base; 256 - timer->base = base; 256 + WRITE_ONCE(timer->base, base); 257 257 goto again; 258 258 } 259 - timer->base = new_base; 259 + WRITE_ONCE(timer->base, new_base); 260 260 } else { 261 261 if (new_cpu_base != this_cpu_base && 262 262 hrtimer_check_target(timer, new_base)) {