]> git.baikalelectronics.ru Git - kernel.git/commit
hrtimer: Use raw_cpu_ptr() in clock_was_set()
authorThomas Gleixner <tglx@linutronix.de>
Thu, 12 Aug 2021 20:31:24 +0000 (22:31 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 12 Aug 2021 20:34:40 +0000 (22:34 +0200)
commit25988e587f2bc9a689e6d52eb96ba187421cf92c
tree3b84411e7abe899ca1cfdc42d6117d58cd7aedc7
parent7513925b0c93e85fee7fafca1fffffdbfbd3ab5b
hrtimer: Use raw_cpu_ptr() in clock_was_set()

clock_was_set() can be invoked from preemptible context. Use raw_cpu_ptr()
to check whether high resolution mode is active or not. It does not matter
whether the task migrates after acquiring the pointer.

Fixes: 2136c38a1c87 ("hrtimer: Force clock_was_set() handling for the HIGHRES=n, NOHZ=y case")
Reported-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/875ywacsmb.ffs@tglx
kernel/time/hrtimer.c