mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
tools lib traceevent: Fix kbuffer_read_at_offset()
When it's called with an offset less than or equal to the first event, it'll return a garbage value since the data is not initialized. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Steven Rostedt <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
3bccbe20f6
commit
a130347973
1 changed files with 1 additions and 0 deletions
|
|
@ -622,6 +622,7 @@ void *kbuffer_read_at_offset(struct kbuffer *kbuf, int offset,
|
|||
|
||||
/* Reset the buffer */
|
||||
kbuffer_load_subbuffer(kbuf, kbuf->subbuffer);
|
||||
data = kbuffer_read_event(kbuf, ts);
|
||||
|
||||
while (kbuf->curr < offset) {
|
||||
data = kbuffer_next_event(kbuf, ts);
|
||||
|
|
|
|||
Loading…
Reference in a new issue