mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 05:24:12 +08:00
ftrace: fix setting of pos in read_pipe
In resetting the iterator in read_pipe, the reset of pos was postitioned in the wrong location with respect to the memset operation. The current code sets pos, incorrectly, to zero. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
2f1dafe50c
commit
4823ed7ead
@ -2455,10 +2455,10 @@ tracing_read_pipe(struct file *filp, char __user *ubuf,
|
||||
cnt = PAGE_SIZE - 1;
|
||||
|
||||
/* reset all but tr, trace, and overruns */
|
||||
iter->pos = -1;
|
||||
memset(&iter->seq, 0,
|
||||
sizeof(struct trace_iterator) -
|
||||
offsetof(struct trace_iterator, seq));
|
||||
iter->pos = -1;
|
||||
|
||||
/*
|
||||
* We need to stop all tracing on all CPUS to read the
|
||||
|
Loading…
Reference in New Issue
Block a user