ftrace: Fix selftest goto location on error
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Sep 2017 16:04:09 +0000 (12:04 -0400)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:09:25 +0000 (01:09 +0000)
commitf3991debdf5966766c2e3069eff45a8a7540b839
treed15fd5b430c7f37232dc1b1c7eb09273285653f3
parent67a4729541ac3462217fc6f34b7d3f346b2be371
ftrace: Fix selftest goto location on error

commit 46320a6acc4fb58f04bcf78c4c942cc43b20f986 upstream.

In the second iteration of trace_selftest_ops(), the error goto label is
wrong in the case where trace_selftest_test_global_cnt is off. In the
case of error, it leaks the dynamic ops that was allocated.

Fixes: 95950c2e ("ftrace: Add self-tests for multiple function trace users")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_selftest.c