]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 18:03:39 +0000 (10:03 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 18:03:39 +0000 (10:03 -0800)
added patches:
timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch

queue-3.10/series
queue-3.10/timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch [new file with mode: 0644]

index 70fad7c37ec44123dc1579ee3f2574afef203f25..34a6da9ce41e7a351f49fcc5d2487743fc8f5775 100644 (file)
@@ -70,3 +70,4 @@ 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
 timekeeping-fix-clock_tai-timer-nanosleep-delays.patch
+timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch
diff --git a/queue-3.10/timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch b/queue-3.10/timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch
new file mode 100644 (file)
index 0000000..f4bed00
--- /dev/null
@@ -0,0 +1,46 @@
+From 330a1617b0a6268d427aa5922c94d082b1d3e96d Mon Sep 17 00:00:00 2001
+From: John Stultz <john.stultz@linaro.org>
+Date: Wed, 11 Dec 2013 19:10:36 -0800
+Subject: timekeeping: Fix missing timekeeping_update in suspend path
+
+From: John Stultz <john.stultz@linaro.org>
+
+commit 330a1617b0a6268d427aa5922c94d082b1d3e96d 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.
+
+In the timekeeping suspend path, we udpate the timekeeper
+structure, so we should be sure to update the shadow-timekeeper
+before releasing the timekeeping locks. Currently this isn't done.
+
+In most cases, the next time related code to run would be
+timekeeping_resume, which does update the shadow-timekeeper, but
+in an abundence of caution, this patch adds the call to
+timekeeping_update() in the suspend path.
+
+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
+@@ -1008,6 +1008,8 @@ static int timekeeping_suspend(void)
+               timekeeping_suspend_time =
+                       timespec_add(timekeeping_suspend_time, delta_delta);
+       }
++
++      timekeeping_update(tk, false, true);
+       write_seqcount_end(&timekeeper_seq);
+       raw_spin_unlock_irqrestore(&timekeeper_lock, flags);