]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Fix regression with module command in stack_trace_filter
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 29 Jun 2017 14:05:45 +0000 (10:05 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 29 Jun 2017 14:05:45 +0000 (10:05 -0400)
commita924c573fe1ba48a8e40a3c0bfaa0eb32f908661
tree6bd68d4113163f5205b7ee89a36b162e92b13d20
parentc439244911f15093dc2d91096ca28c8764d4ef54
ftrace: Fix regression with module command in stack_trace_filter

When doing the following command:

 # echo ":mod:kvm_intel" > /sys/kernel/tracing/stack_trace_filter

it triggered a crash.

This happened with the clean up of probes. It required all callers to the
regex function (doing ftrace filtering) to have ops->private be a pointer to
a trace_array. But for the stack tracer, that is not the case.

Allow for the ops->private to be NULL, and change the function command
callbacks to handle the trace_array pointer being NULL as well.

Fixes: 9573571d5b3e ("tracing/ftrace: Allow instances to have their own function probes")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ftrace.c
kernel/trace/trace.c
kernel/trace/trace_functions.c
kernel/trace/trace_stack.c