kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task...
authorKaitao Cheng <pilgrimtao@gmail.com>
Tue, 31 Dec 2019 13:35:30 +0000 (05:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jan 2020 19:04:26 +0000 (20:04 +0100)
commit62599bee27f15d5dbf8340e663b3370331c0777e
tree53196b16c21bf8be19c973338d2f11329cad3d8b
parent638b632ddec39db8600efa90c765e9f7fa11a2ef
kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail

commit 50f9ad607ea891a9308e67b81f774c71736d1098 upstream.

In the function, if register_trace_sched_migrate_task() returns error,
sched_switch/sched_wakeup_new/sched_wakeup won't unregister. That is
why fail_deprobe_sched_switch was added.

Link: http://lkml.kernel.org/r/20191231133530.2794-1-pilgrimtao@gmail.com
Cc: stable@vger.kernel.org
Fixes: 478142c39c8c2 ("tracing: do not grab lock in wakeup latency function tracing")
Signed-off-by: Kaitao Cheng <pilgrimtao@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_sched_wakeup.c