aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2022-04-15 11:19:35 +0200
committerThomas Gleixner <tglx@linutronix.de>2022-05-02 14:00:20 +0200
commiteff4849f928f2b90402907e06a6de1619cf16b1a (patch)
tree89d6e893ef94311faf785a7d86cf44c6e5d8cb1d /kernel/time
parenttimers/nohz: Switch to ONESHOT_STOPPED in the low-res handler when the tick is stopped (diff)
downloadlinux-dev-eff4849f928f2b90402907e06a6de1619cf16b1a.tar.xz
linux-dev-eff4849f928f2b90402907e06a6de1619cf16b1a.zip
timekeeping: Annotate ktime_get_boot_fast_ns() with data_race()
Accessing timekeeper::offset_boot in ktime_get_boot_fast_ns() is an intended data race as the reader side cannot synchronize with a writer and there is no space in struct tk_read_base of the NMI safe timekeeper. Mark it so. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20220415091920.956045162@linutronix.de
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/timekeeping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 2c22023fbf5f..3479804ed5e6 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -528,7 +528,7 @@ u64 notrace ktime_get_boot_fast_ns(void)
{
struct timekeeper *tk = &tk_core.timekeeper;
- return (ktime_get_mono_fast_ns() + ktime_to_ns(tk->offs_boot));
+ return (ktime_get_mono_fast_ns() + ktime_to_ns(data_race(tk->offs_boot)));
}
EXPORT_SYMBOL_GPL(ktime_get_boot_fast_ns);