[rt] Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()" in 3.14.6

svn path=/dists/sid/linux/; revision=21478
This commit is contained in:
Ben Hutchings 2014-06-29 02:31:36 +00:00
parent 194b7a793f
commit 26c56f7113
4 changed files with 43 additions and 4 deletions

2
debian/changelog vendored
View File

@ -54,6 +54,8 @@ linux (3.14.9-1) UNRELEASED; urgency=medium
- propagate aufs file references to new vmas created by remap_file_pages()
* linux-image: Make initramfs support unconditional
* [x86] x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508)
* [rt] Fix latency histogram after "hrtimer: Set expiry time before
switch_hrtimer_base()" in 3.14.6
[ Aurelien Jarno ]
* [arm64] Enable COMPAT to support 32-bit binaries.

View File

@ -1,10 +1,7 @@
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_SCHED_TRACER=y
#. This option is broken after commit 84ea7fe37908
#. ('hrtimer: Set expiry time before switch_hrtimer_base()') but should be
#. enabled when this is resolved
# CONFIG_MISSED_TIMER_OFFSETS_HIST is not set
CONFIG_MISSED_TIMER_OFFSETS_HIST=y
CONFIG_WAKEUP_LATENCY_HIST=y
## disable aufs as it's not needed on rt and conflicts with fs-dentry-use-seqlock.patch

View File

@ -0,0 +1,39 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 28 Jun 2014 23:34:48 +0100
Subject: Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()"
Forwarded: http://mid.gmane.org/1403994888.23472.116.camel@deadeye.wl.decadent.org.uk
In an rt-kernel with CONFIG_MISSED_TIMER_OFFSETS_HIST enabled,
__hrtimer_start_range_ns() now crashes, as new_base is not assigned
before it is used.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Carsten Emde <C.Emde@osadl.org>
Cc: stable-rt@vger.kernel.org
---
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1106,6 +1106,11 @@ int __hrtimer_start_range_ns(struct hrti
#endif
}
+ hrtimer_set_expires_range_ns(timer, tim, delta_ns);
+
+ /* Switch the timer base, if necessary: */
+ new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
+
#ifdef CONFIG_MISSED_TIMER_OFFSETS_HIST
{
ktime_t now = new_base->get_time();
@@ -1117,11 +1122,6 @@ int __hrtimer_start_range_ns(struct hrti
}
#endif
- hrtimer_set_expires_range_ns(timer, tim, delta_ns);
-
- /* Switch the timer base, if necessary: */
- new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
-
timer_stats_hrtimer_set_start_info(timer);
leftmost = enqueue_hrtimer(timer, new_base);

View File

@ -658,3 +658,4 @@ features/all/rt/disable-preempt-lazy-on-x86-64.patch
# Add RT to version
features/all/rt/localversion.patch
features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch