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

Commit b5685aed authored by Steven Rostedt's avatar Steven Rostedt Committed by Thomas Gleixner
Browse files

ftrace: restore iterator trace in pipe read



The trace iterator is reset in the read. We still need to restore the tracer
that the trace_pipe was opened with.

Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 8487c237
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -2202,6 +2202,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
{
{
	struct trace_iterator *iter = filp->private_data;
	struct trace_iterator *iter = filp->private_data;
	struct trace_array_cpu *data;
	struct trace_array_cpu *data;
	struct trace_array *tr = iter->tr;
	struct tracer *tracer = iter->trace;
	static cpumask_t mask;
	static cpumask_t mask;
	static int start;
	static int start;
	unsigned long flags;
	unsigned long flags;
@@ -2274,7 +2276,8 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
		cnt = PAGE_SIZE - 1;
		cnt = PAGE_SIZE - 1;


	memset(iter, 0, sizeof(*iter));
	memset(iter, 0, sizeof(*iter));
	iter->tr = &global_trace;
	iter->tr = tr;
	iter->trace = tracer;
	iter->pos = -1;
	iter->pos = -1;


	/*
	/*