Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bcae09b authored by Zhaolei's avatar Zhaolei Committed by Ingo Molnar
Browse files

ftrace: Add check of sched_stopped for probe_sched_wakeup



The wakeup tracing in sched_switch does not stop when a user
disables tracing. This is because the probe_sched_wakeup() is missing
the check to prevent the wakeup from being traced.

Signed-off-by: default avatarZhao Lei <zhaolei@cn.fujitsu.com>
LKML-Reference: <49D1C543.3010307@cn.fujitsu.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 5ac9f622
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ probe_sched_wakeup(struct rq *__rq, struct task_struct *wakee, int success)
	pc = preempt_count();
	tracing_record_cmdline(current);

	if (sched_stopped)
		return;

	local_irq_save(flags);
	cpu = raw_smp_processor_id();
	data = ctx_trace->data[cpu];