[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140630121038.61392ab8@gandalf.local.home>
Date: Mon, 30 Jun 2014 12:10:38 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ben Hutchings <ben@...adent.org.uk>
Cc: Carsten Emde <C.Emde@...dl.org>,
Thomas Gleixner <tglx@...utronix.de>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
LKML <linux-kernel@...r.kernel.org>, stable-rt@...r.kernel.org
Subject: Re: [PATCH rt] Fix latency histogram after "hrtimer: Set expiry
time before switch_hrtimer_base()"
On Sat, 28 Jun 2014 23:34:48 +0100
Ben Hutchings <ben@...adent.org.uk> wrote:
> 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@...adent.org.uk>
> Tested-by: Carsten Emde <C.Emde@...dl.org>
> Cc: stable-rt@...r.kernel.org
Thanks, I'm applying it now. Will need to go through the various tests
before I push it out.
-- Steve
> ---
> --- 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);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists