From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
stable-rt@vger.kernel.org, Ben Hutchings <ben@decadent.org.uk>
Subject: [PATCH RT 1/2] Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()"
Date: Thu, 03 Jul 2014 08:55:30 -0400 [thread overview]
Message-ID: <20140703125539.165672321@goodmis.org> (raw)
In-Reply-To: 20140703125529.692457366@goodmis.org
[-- Attachment #1: 0001-Fix-latency-histogram-after-hrtimer-Set-expiry-time-.patch --]
[-- Type: text/plain, Size: 1343 bytes --]
3.2.60-rt88-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <ben@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.
Tested-by: Carsten Emde <C.Emde@osadl.org>
Cc: stable-rt@vger.kernel.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/hrtimer.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index f54379023e16..2bd88f06a6d0 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1033,6 +1033,11 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
#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();
@@ -1044,11 +1049,6 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
}
#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);
next prev parent reply other threads:[~2014-07-03 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 12:55 [PATCH RT 0/2] Linux 3.2.60-rt88-rc1 Steven Rostedt
2014-07-03 12:55 ` Steven Rostedt [this message]
2014-07-03 12:55 ` [PATCH RT 2/2] " Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2014-07-03 3:00 [PATCH RT 0/2] " Steven Rostedt
2014-07-03 3:00 ` [PATCH RT 1/2] Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()" Steven Rostedt
2014-07-03 1:34 [PATCH RT 0/2] Linux 3.4.94-rt117-rc1 Steven Rostedt
2014-07-03 1:34 ` [PATCH RT 1/2] Fix latency histogram after "hrtimer: Set expiry time before switch_hrtimer_base()" Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140703125539.165672321@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=ben@decadent.org.uk \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).