lkml.org 
[lkml]   [2010]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][GIT PULL] ftrace: Add function names to dangling } in function graph tracer
From
Date
On Sat, 2010-02-27 at 11:02 +0100, Frederic Weisbecker wrote:

> > /*
> > * Comments display at + 1 to depth. Since
> > * this is a leaf function, keep the comments
> > * equal to this depth.
> > */
> > - *depth = call->depth - 1;
> > + cpu_data->depth = call->depth - 1;
> > +
> > + /* No need to keep this function around for this depth */
> > + if (call->depth < FTRACE_RETFUNC_DEPTH)
>
>
>
> Do you really need to check that? call->depth >= FTRACE_RETFUNC_DEPTH
> are not recorded.
>
>

Call me paranoid, but working inside the kernel makes me paranoid. If
for some reason a trace gets corrupted here, not doing this check can
cause a kernel oops.

>
> > + cpu_data->enter_funcs[call->depth] = 0;

cpu_data->enter_funcs[102340320211] = 0;

would be bad ;-)


Hmm, I should also make sure depth is not less than zero. I'll send a
new patch to do that too.

-- Steve

> > }
> >



\
 
 \ /
  Last update: 2010-02-27 20:27    [W:0.064 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site