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)
commit9482fd71dbb8f0d1a61821a83e467dc0a9d7b429
tree3b84411e7abe899ca1cfdc42d6117d58cd7aedc7
parent1e7f7fbcd40c69d23e3fe641ead9f3dc128fa8aa
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: e71a4153b7c2 ("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