Re: [for-next][PATCH 7/8] fgraph: Handle a case where a tracer ignores set_graph_notrace

From: Steven Rostedt
Date: Mon Dec 12 2016 - 13:07:26 EST


On Tue, 13 Dec 2016 02:09:04 +0900
Namhyung Kim <namhyung@xxxxxxxxxx> wrote:


> > I wanted the simplest fix for stable.
>
> I think a simpler fix is just to return when it sees a negative record..

You're right, but I guess I was trying to get it someone closer to the
final change too.

-- Steve

>
>
> diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
> index 52fb1e21b86b..2fb73c2e35b5 100644
> --- a/kernel/trace/trace_functions_graph.c
> +++ b/kernel/trace/trace_functions_graph.c
> @@ -844,7 +844,7 @@ print_graph_entry_leaf(struct trace_iterator *iter,
>
> /* If a graph tracer ignored set_graph_notrace */
> if (call->depth < -1)
> - call->depth += FTRACE_NOTRACE_DEPTH;
> + return TRACE_TYPE_HANDLED;
>
> /*
> * Comments display at + 1 to depth. Since
> @@ -887,7 +887,7 @@ print_graph_entry_nested(struct trace_iterator *iter,
>
> /* If a graph tracer ignored set_graph_notrace */
> if (call->depth < -1)
> - call->depth += FTRACE_NOTRACE_DEPTH;
> + return TRACE_TYPE_HANDLED;
>
> cpu_data = per_cpu_ptr(data->cpu_data, cpu);
> cpu_data->depth = call->depth;
>
>
> Thanks,
> Namhyung