lkml.org 
[lkml]   [2014]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Use preempt_disable_notrace() in cycles_2_ns()
On Tue, Feb 04, 2014 at 02:13:15PM -0500, Steven Rostedt wrote:
> When debug preempt is enabled, preempt_disable() can be traced by
> function and function graph tracing.
>
> There's a place in the function graph tracer that calls trace_clock()
> which eventually calls cycles_2_ns() outside of the recursion
> protection. When cycles_2_ns() calls preempt_disable() it gets traced
> and the graph tracer will go into a recursive loop causing a crash or
> worse, a triple fault.
>
> Simple fix is to use preempt_disable_notrace() in cycles_2_ns, which
> makes sense because the preempt_disable() tracing may use that code
> too, and it tracing it, even with recursion protection is rather
> pointless.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Indeed, thanks!


\
 
 \ /
  Last update: 2014-02-04 21:41    [W:0.063 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site