]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 17:52:58 +0000 (09:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 17:52:58 +0000 (09:52 -0800)
added patches:
timekeeping-fix-lost-updates-to-tai-adjustment.patch

queue-3.10/series
queue-3.10/timekeeping-fix-lost-updates-to-tai-adjustment.patch [new file with mode: 0644]

index c11c97486f3f365de66b6ed39b600e28bbbf9d2b..a43d8b9752116c03e9d6ea8128f7d922464e4cc2 100644 (file)
@@ -68,3 +68,4 @@ i2c-i801-smbus-patch-for-intel-coleto-creek-deviceids.patch
 ftrace-synchronize-setting-function_trace_op-with-ftrace_trace_function.patch
 ftrace-fix-synchronization-location-disabling-and-freeing-ftrace_ops.patch
 ftrace-have-function-graph-only-trace-based-on-global_ops-filters.patch
+timekeeping-fix-lost-updates-to-tai-adjustment.patch
diff --git a/queue-3.10/timekeeping-fix-lost-updates-to-tai-adjustment.patch b/queue-3.10/timekeeping-fix-lost-updates-to-tai-adjustment.patch
new file mode 100644 (file)
index 0000000..7e4e0fa
--- /dev/null
@@ -0,0 +1,52 @@
+From f55c07607a38f84b5c7e6066ee1cfe433fa5643c Mon Sep 17 00:00:00 2001
+From: John Stultz <john.stultz@linaro.org>
+Date: Wed, 11 Dec 2013 18:50:25 -0800
+Subject: timekeeping: Fix lost updates to tai adjustment
+
+From: John Stultz <john.stultz@linaro.org>
+
+commit f55c07607a38f84b5c7e6066ee1cfe433fa5643c upstream.
+
+Since 48cdc135d4840 (Implement a shadow timekeeper), we have to
+call timekeeping_update() after any adjustment to the timekeeping
+structure in order to make sure that any adjustments to the structure
+persist.
+
+Unfortunately, the updates to the tai offset via adjtimex do not
+trigger this update, causing adjustments to the tai offset to be
+made and then over-written by the previous value at the next
+update_wall_time() call.
+
+This patch resovles the issue by calling timekeeping_update()
+right after setting the tai offset.
+
+Cc: Sasha Levin <sasha.levin@oracle.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Prarit Bhargava <prarit@redhat.com>
+Cc: Richard Cochran <richardcochran@gmail.com>
+Cc: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/timekeeping.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/time/timekeeping.c
++++ b/kernel/time/timekeeping.c
+@@ -605,6 +605,7 @@ void timekeeping_set_tai_offset(s32 tai_
+       raw_spin_lock_irqsave(&timekeeper_lock, flags);
+       write_seqcount_begin(&timekeeper_seq);
+       __timekeeping_set_tai_offset(tk, tai_offset);
++      timekeeping_update(tk, false, true);
+       write_seqcount_end(&timekeeper_seq);
+       raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
+       clock_was_set();
+@@ -1677,6 +1678,7 @@ int do_adjtimex(struct timex *txc)
+       if (tai != orig_tai) {
+               __timekeeping_set_tai_offset(tk, tai);
++              timekeeping_update(tk, false, true);
+               clock_was_set_delayed();
+       }
+       write_seqcount_end(&timekeeper_seq);