diff --git a/debian/changelog b/debian/changelog index 5458a015d..8861f023f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. diff --git a/debian/config/featureset-rt/config b/debian/config/featureset-rt/config index 1610bdc49..247fe31b6 100644 --- a/debian/config/featureset-rt/config +++ b/debian/config/featureset-rt/config @@ -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 diff --git a/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch b/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch new file mode 100644 index 000000000..25156e95a --- /dev/null +++ b/debian/patches/features/all/rt/fix-latency-histogram-after-hrtimer-set-expiry-time-before-switch_hrtimer_base.patch @@ -0,0 +1,39 @@ +From: Ben Hutchings +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 +Tested-by: Carsten Emde +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); diff --git a/debian/patches/series-rt b/debian/patches/series-rt index d692371fc..c473c1317 100644 --- a/debian/patches/series-rt +++ b/debian/patches/series-rt @@ -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