Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timers: Plug locking race vs. timer migration
Linus noticed that lock_timer_base() lacks a READ_ONCE() for accessing the timer flags. As a consequence the compiler is allowed to reload the flags between the initial check for TIMER_MIGRATION and the following timer base computation and the spin lock of the base. While this has not been observed (yet), we need to make sure that it never happens. Fixes: 0eeda71 ("timer: Replace timer base by a cpu index") Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610241711220.4983@nanos Cc: [email protected] Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]>
- Loading branch information