]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Feb 2018 12:24:28 +0000 (13:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Feb 2018 12:24:28 +0000 (13:24 +0100)
added patches:
hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch

queue-3.18/hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch [new file with mode: 0644]
queue-3.18/series
queue-4.14/series [new file with mode: 0644]
queue-4.15/series
queue-4.4/series [new file with mode: 0644]
queue-4.9/series [new file with mode: 0644]

diff --git a/queue-3.18/hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch b/queue-3.18/hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
new file mode 100644 (file)
index 0000000..341eebd
--- /dev/null
@@ -0,0 +1,55 @@
+From 48d0c9becc7f3c66874c100c126459a9da0fdced Mon Sep 17 00:00:00 2001
+From: Anna-Maria Gleixner <anna-maria@linutronix.de>
+Date: Thu, 21 Dec 2017 11:41:35 +0100
+Subject: hrtimer: Ensure POSIX compliance (relative CLOCK_REALTIME hrtimers)
+
+From: Anna-Maria Gleixner <anna-maria@linutronix.de>
+
+commit 48d0c9becc7f3c66874c100c126459a9da0fdced upstream.
+
+The POSIX specification defines that relative CLOCK_REALTIME timers are not
+affected by clock modifications. Those timers have to use CLOCK_MONOTONIC
+to ensure POSIX compliance.
+
+The introduction of the additional HRTIMER_MODE_PINNED mode broke this
+requirement for pinned timers.
+
+There is no user space visible impact because user space timers are not
+using pinned mode, but for consistency reasons this needs to be fixed.
+
+Check whether the mode has the HRTIMER_MODE_REL bit set instead of
+comparing with HRTIMER_MODE_ABS.
+
+Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
+Cc: Christoph Hellwig <hch@lst.de>
+Cc: John Stultz <john.stultz@linaro.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: keescook@chromium.org
+Fixes: 597d0275736d ("timers: Framework for identifying pinned timers")
+Link: http://lkml.kernel.org/r/20171221104205.7269-7-anna-maria@linutronix.de
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Cc: Mike Galbraith <efault@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/time/hrtimer.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/kernel/time/hrtimer.c
++++ b/kernel/time/hrtimer.c
+@@ -1149,7 +1149,12 @@ static void __hrtimer_init(struct hrtime
+       cpu_base = raw_cpu_ptr(&hrtimer_bases);
+-      if (clock_id == CLOCK_REALTIME && mode != HRTIMER_MODE_ABS)
++      /*
++       * POSIX magic: Relative CLOCK_REALTIME timers are not affected by
++       * clock modifications, so they needs to become CLOCK_MONOTONIC to
++       * ensure POSIX compliance.
++       */
++      if (clock_id == CLOCK_REALTIME && mode & HRTIMER_MODE_REL)
+               clock_id = CLOCK_MONOTONIC;
+       base = hrtimer_clockid_to_base(clock_id);
index e4dff3eae941f946d00d83703416e466d3edd357..ba7f03e895b81a812ebd0fac68bac2e15a63e8c7 100644 (file)
@@ -1 +1,2 @@
 ipv6-skip-xfrm-lookup-if-dst_entry-in-socket-cache-is-valid.patch
+hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
diff --git a/queue-4.14/series b/queue-4.14/series
new file mode 100644 (file)
index 0000000..abaef70
--- /dev/null
@@ -0,0 +1 @@
+hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
index 40f36c3ec0d0e3e4dea52fae984724cb5321f290..09fcb2a96acd8c2f7fdb88f33fed2464a10596b9 100644 (file)
@@ -1 +1,2 @@
 vsprintf-avoid-misleading-null-for-px.patch
+hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
diff --git a/queue-4.4/series b/queue-4.4/series
new file mode 100644 (file)
index 0000000..abaef70
--- /dev/null
@@ -0,0 +1 @@
+hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch
diff --git a/queue-4.9/series b/queue-4.9/series
new file mode 100644 (file)
index 0000000..abaef70
--- /dev/null
@@ -0,0 +1 @@
+hrtimer-ensure-posix-compliance-relative-clock_realtime-hrtimers.patch